From: Marcel Werk Date: Sun, 6 Nov 2016 13:40:38 +0000 (+0100) Subject: Disabled unnecessary box handler initialization in acp X-Git-Tag: 3.0.0_Beta_5~66^2~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3cf10b4f1856c4620b7de5d3eafba5f9dcdf17b7;p=GitHub%2FWoltLab%2FWCF.git Disabled unnecessary box handler initialization in acp --- diff --git a/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php b/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php index 258ff7eb6a..18efbe6f16 100644 --- a/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php +++ b/wcfsetup/install/files/lib/system/exception/NamedUserException.class.php @@ -3,6 +3,7 @@ namespace wcf\system\exception; use wcf\system\box\BoxHandler; use wcf\system\session\SessionHandler; use wcf\system\WCF; +use wcf\system\WCFACP; /** * NamedUserException shows a (well) styled page with the given error message. @@ -17,7 +18,9 @@ class NamedUserException extends UserException { * Shows a styled page with the given error message. */ public function show() { - BoxHandler::getInstance()->disablePageLayout(); + if (!class_exists(WCFACP::class, false)) { + BoxHandler::getInstance()->disablePageLayout(); + } SessionHandler::getInstance()->disableTracking(); WCF::getTPL()->assign([ diff --git a/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php b/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php index d2fe446972..b8632c008c 100644 --- a/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php +++ b/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php @@ -3,6 +3,7 @@ namespace wcf\system\exception; use wcf\system\box\BoxHandler; use wcf\system\session\SessionHandler; use wcf\system\WCF; +use wcf\system\WCFACP; /** * A PermissionDeniedException is thrown when a user has no permission to access @@ -25,7 +26,9 @@ class PermissionDeniedException extends UserException { * Prints a permission denied exception. */ public function show() { - BoxHandler::getInstance()->disablePageLayout(); + if (!class_exists(WCFACP::class, false)) { + BoxHandler::getInstance()->disablePageLayout(); + } SessionHandler::getInstance()->disableTracking(); @header('HTTP/1.0 403 Forbidden');