mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Use e107::route() to safely get e_ROUTE value.
This commit is contained in:
@@ -4079,15 +4079,21 @@ class e107
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static function route($route)
|
||||
/**
|
||||
* Set the route or get the current route when $route is null.
|
||||
* @param string $route
|
||||
* @return string|null
|
||||
*/
|
||||
public static function route($route = null)
|
||||
{
|
||||
if(defined('e_ROUTE'))
|
||||
{
|
||||
return null;
|
||||
return e_ROUTE;
|
||||
}
|
||||
|
||||
define('e_ROUTE', $route);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user