diff --git a/e107_handlers/application.php b/e107_handlers/application.php index bcb18a134..9a776fde8 100644 --- a/e107_handlers/application.php +++ b/e107_handlers/application.php @@ -194,9 +194,9 @@ class e_url define('e_PAGE', basename($file)); } - if(!defined('e_ROUTE')) // subject to removal at any time. + if(!e107::route()) // subject to removal at any time. { - define('e_ROUTE', $plug.'/'.$k); + e107::route($plug.'/'.$k); } $fpUrl = str_replace(SITEURL, '', rtrim(e_REQUEST_URL, '?/')); diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index e3c64b11c..e450e1c51 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -4109,12 +4109,12 @@ class e107 */ public static function route($route = null) { - if(defined('e_ROUTE')) + if($route === null) { - return e_ROUTE; + return self::getRegistry('core/e107/route', false); } - define('e_ROUTE', $route); + self::setRegistry('core/e107/route', $route); return null; } diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index c9c4be2b5..32c355aa1 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -1337,7 +1337,7 @@ class e_theme $request = [ 'url' => e_REQUEST_URL, 'script' => varset($_SERVER['SCRIPT_FILENAME'],null), - 'route' => deftrue('e_ROUTE', null), + 'route' => e107::route(), ]; $deflayout = self::getThemeLayout($cusPagePref, $cusPageDef, $request); diff --git a/e107_languages/English/admin/lan_theme.php b/e107_languages/English/admin/lan_theme.php index 5d0900227..a9ca89569 100644 --- a/e107_languages/English/admin/lan_theme.php +++ b/e107_languages/English/admin/lan_theme.php @@ -139,5 +139,5 @@ define("TPVLANHELP_03", "By default, the visibility filter will change the theme define("TPVLANHELP_04", "End lines with a [b]![/b] to exactly match against the end of URL."); define("TPVLANHELP_05", "End lines with a [b]$[/b] to exactly match against the end of script path."); -define("TPVLANHELP_06", "Start lines with a [b]:[/b] to partially or fully match against the e_ROUTE constant."); +define("TPVLANHELP_06", "Start lines with a [b]:[/b] to partially or fully match against e107::route()"); define("TPVLAN_97", "This theme requires a newer version of e107."); \ No newline at end of file diff --git a/e107_plugins/news/news.php b/e107_plugins/news/news.php index 169b097cf..06e915b59 100644 --- a/e107_plugins/news/news.php +++ b/e107_plugins/news/news.php @@ -1343,11 +1343,12 @@ class news_front header("HTTP/1.0 404 Not Found",true,404); require_once(e_LANGUAGEDIR.e_LANGUAGE."/lan_error.php"); - $text = e107::getMessage()->setTitle(LAN_ERROR_7, E_MESSAGE_INFO)->addInfo(LAN_NEWS_308)->render(); // Perhaps you're looking for one of the news items below? - + $text = "
".e107::getMessage()->setTitle(LAN_ERROR_7, E_MESSAGE_INFO)->addInfo(LAN_NEWS_308)->render(); // Perhaps you're looking for one of the news items below? + $text .= "
"; $this->action = 'all'; $text .= $this->renderListTemplate(); + return $text; } diff --git a/index.php b/index.php index baf7a08d1..1de8a134a 100644 --- a/index.php +++ b/index.php @@ -88,9 +88,9 @@ $request->setLegacyQstring(); $request->setLegacyPage(); - if(!defined('e_ROUTE') && ($rq = $request->getRoute())) + if(!e107::route() && ($rq = $request->getRoute())) { - define('e_ROUTE', $rq); + e107::route($rq); unset($rq); }