From: Alexander Ebert Date: Tue, 3 Mar 2015 14:17:00 +0000 (+0100) Subject: Fixed issues when routes to ACP and frontend are generated on the same page X-Git-Tag: 2.1.1~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9db1d6a1381439584d10133d946d65fc27f855a8;p=GitHub%2FWoltLab%2FWCF.git Fixed issues when routes to ACP and frontend are generated on the same page --- diff --git a/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php b/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php index 2ee79a42e5..16840d4af2 100644 --- a/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php +++ b/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php @@ -23,6 +23,12 @@ class FlexibleRoute implements IRoute { */ protected $buildSchema = array(); + /** + * cached list of transformed controller names + * @var array + */ + protected $controllerNames = array(); + /** * route is restricted to ACP * @var boolean @@ -47,12 +53,6 @@ class FlexibleRoute implements IRoute { */ protected $routeData = array(); - /** - * cached list of transformed controller names - * @var array - */ - protected static $controllerNames = array(); - /** * Creates a new flexible route instace. * @@ -278,13 +278,13 @@ class FlexibleRoute implements IRoute { * @return string */ protected function getControllerName($application, $controller) { - if (!isset(self::$controllerNames[$controller])) { + if (!isset($this->controllerNames[$controller])) { $controllerName = RequestHandler::getTokenizedController($controller); $alias = (!$this->isACP) ? RequestHandler::getInstance()->getAliasByController($controllerName) : null; - self::$controllerNames[$controller] = ($alias) ?: $controllerName; + $this->controllerNames[$controller] = ($alias) ?: $controllerName; } - return self::$controllerNames[$controller]; + return $this->controllerNames[$controller]; } }