Merge pull request 'Consistently get the self URL.' (#92) from wn/tt-rss:bugfix/config-self-url-consistency into master
Reviewed-on: https://dev.tt-rss.org/tt-rss/tt-rss/pulls/92
This commit is contained in:
commit
292ca86665
|
@ -98,11 +98,11 @@ class Digest
|
|||
|
||||
$tpl->setVariable('CUR_DATE', date('Y/m/d', $local_ts));
|
||||
$tpl->setVariable('CUR_TIME', date('G:i', $local_ts));
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get_self_url());
|
||||
|
||||
$tpl_t->setVariable('CUR_DATE', date('Y/m/d', $local_ts));
|
||||
$tpl_t->setVariable('CUR_TIME', date('G:i', $local_ts));
|
||||
$tpl_t->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
|
||||
$tpl_t->setVariable('TTRSS_HOST', Config::get_self_url());
|
||||
|
||||
$affected_ids = array();
|
||||
|
||||
|
|
|
@ -418,7 +418,7 @@ class Handler_Public extends Handler {
|
|||
|
||||
$return = clean($_REQUEST['return']);
|
||||
|
||||
if ($_REQUEST['return'] && mb_strpos($return, Config::get(Config::SELF_URL_PATH)) === 0) {
|
||||
if ($_REQUEST['return'] && mb_strpos($return, Config::get_self_url()) === 0) {
|
||||
header("Location: " . clean($_REQUEST['return']));
|
||||
} else {
|
||||
header("Location: " . Config::get_self_url());
|
||||
|
@ -572,7 +572,7 @@ class Handler_Public extends Handler {
|
|||
|
||||
$tpl->setVariable('LOGIN', $login);
|
||||
$tpl->setVariable('RESETPASS_LINK', $resetpass_link);
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get_self_url());
|
||||
|
||||
$tpl->addBlock('message');
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
|
||||
$tpl->setVariable('LOGIN', $user->login);
|
||||
$tpl->setVariable('NEWMAIL', $new_email);
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get_self_url());
|
||||
|
||||
$tpl->addBlock('message');
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
$tpl->readTemplateFromFile("otp_disabled_template.txt");
|
||||
|
||||
$tpl->setVariable('LOGIN', $row["login"]);
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get_self_url());
|
||||
|
||||
$tpl->addBlock('message');
|
||||
|
||||
|
|
|
@ -451,7 +451,7 @@ class RPC extends Handler_Protected {
|
|||
|
||||
$params["safe_mode"] = !empty($_SESSION["safe_mode"]);
|
||||
$params["check_for_updates"] = Config::get(Config::CHECK_FOR_UPDATES);
|
||||
$params["icons_url"] = Config::get(Config::SELF_URL_PATH) . '/public.php';
|
||||
$params["icons_url"] = Config::get_self_url() . '/public.php';
|
||||
$params["cookie_lifetime"] = Config::get(Config::SESSION_COOKIE_LIFETIME);
|
||||
$params["default_view_mode"] = get_pref(Prefs::_DEFAULT_VIEW_MODE);
|
||||
$params["default_view_limit"] = (int) get_pref(Prefs::_DEFAULT_VIEW_LIMIT);
|
||||
|
|
|
@ -54,7 +54,7 @@ class Sanitizer {
|
|||
}
|
||||
|
||||
private static function is_prefix_https(): bool {
|
||||
return parse_url(Config::get(Config::SELF_URL_PATH), PHP_URL_SCHEME) == 'https';
|
||||
return parse_url(Config::get_self_url(), PHP_URL_SCHEME) == 'https';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -224,7 +224,7 @@ class Auth_Internal extends Auth_Base {
|
|||
$tpl->readTemplateFromFile("password_change_template.txt");
|
||||
|
||||
$tpl->setVariable('LOGIN', $user->login);
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get_self_url());
|
||||
|
||||
$tpl->addBlock('message');
|
||||
|
||||
|
|
Loading…
Reference in New Issue