mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Moved experimental e_ROUTE constant to registry.
This commit is contained in:
@@ -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, '?/'));
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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.");
|
@@ -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 = "<div class='news-view-error'>".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 .= "</div>";
|
||||
$this->action = 'all';
|
||||
$text .= $this->renderListTemplate();
|
||||
|
||||
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user