From: Marcel Werk Date: Thu, 22 Dec 2016 18:51:43 +0000 (+0100) Subject: Made BoxHandler::disablePageLayout static X-Git-Tag: 3.0.0_RC_3~67 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d5e979b9138a9ef9191cf499fa27b1480c83289;p=GitHub%2FWoltLab%2FWCF.git Made BoxHandler::disablePageLayout static --- diff --git a/wcfsetup/install/files/lib/system/box/BoxHandler.class.php b/wcfsetup/install/files/lib/system/box/BoxHandler.class.php index 09320cebed..89d1a86716 100644 --- a/wcfsetup/install/files/lib/system/box/BoxHandler.class.php +++ b/wcfsetup/install/files/lib/system/box/BoxHandler.class.php @@ -37,9 +37,9 @@ class BoxHandler extends SingletonFactory { protected $boxesByPosition = []; /** - * @var bool + * @var boolean */ - protected $disablePageLayout = false; + protected static $disablePageLayout = false; /** * @inheritDoc @@ -47,7 +47,7 @@ class BoxHandler extends SingletonFactory { protected function init() { // get active page id $pageID = 0; - if (!$this->disablePageLayout) { + if (!self::$disablePageLayout) { if (($request = RequestHandler::getInstance()->getActiveRequest()) !== null) { $pageID = $request->getPageID(); } @@ -203,7 +203,7 @@ class BoxHandler extends SingletonFactory { /** * Disables the loading of the box layout for the active page. */ - public function disablePageLayout() { - $this->disablePageLayout = true; + public static function disablePageLayout() { + self::$disablePageLayout = true; } } diff --git a/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php b/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php index 18efbe6f16..893a9e41b5 100644 --- a/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php +++ b/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php @@ -19,7 +19,7 @@ class NamedUserException extends UserException { */ public function show() { if (!class_exists(WCFACP::class, false)) { - BoxHandler::getInstance()->disablePageLayout(); + BoxHandler::disablePageLayout(); } SessionHandler::getInstance()->disableTracking(); diff --git a/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php b/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php index b8632c008c..bdb9988504 100644 --- a/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php +++ b/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php @@ -27,7 +27,7 @@ class PermissionDeniedException extends UserException { */ public function show() { if (!class_exists(WCFACP::class, false)) { - BoxHandler::getInstance()->disablePageLayout(); + BoxHandler::disablePageLayout(); } SessionHandler::getInstance()->disableTracking(); diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index e1d49e3e0a..fb99967da0 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -78,7 +78,7 @@ class RequestHandler extends SingletonFactory { } else { @header('HTTP/1.1 503 Service Unavailable'); - BoxHandler::getInstance()->disablePageLayout(); + BoxHandler::disablePageLayout(); WCF::getTPL()->assign([ 'templateName' => 'offline', 'templateNameApplication' => 'wcf'