diff --git a/classes/digest.php b/classes/digest.php index a5dbc0945..b19c37c5f 100644 --- a/classes/digest.php +++ b/classes/digest.php @@ -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(); diff --git a/classes/handler/public.php b/classes/handler/public.php index 484f92507..b848b15fe 100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -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'); diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 0c1b90213..1e02a0508 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -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'); diff --git a/classes/rpc.php b/classes/rpc.php index a2250157a..204b002d5 100755 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -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); diff --git a/classes/sanitizer.php b/classes/sanitizer.php index e2055930b..8b4584a28 100644 --- a/classes/sanitizer.php +++ b/classes/sanitizer.php @@ -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'; } /** diff --git a/plugins/auth_internal/init.php b/plugins/auth_internal/init.php index 882b5506a..135e4d3ed 100644 --- a/plugins/auth_internal/init.php +++ b/plugins/auth_internal/init.php @@ -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');