From 6d5e979b9138a9ef9191cf499fa27b1480c83289 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 22 Dec 2016 19:51:43 +0100 Subject: [PATCH] Made BoxHandler::disablePageLayout static --- .../install/files/lib/system/box/BoxHandler.class.php | 10 +++++----- .../lib/system/exception/NamedUserException.class.php | 2 +- .../exception/PermissionDeniedException.class.php | 2 +- .../files/lib/system/request/RequestHandler.class.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) 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' -- 2.20.1