*/
protected $boxesByPosition = [];
+ /**
+ * @var bool
+ */
+ protected $disablePageLayout = false;
+
/**
* @inheritDoc
*/
protected function init() {
// get active page id
$pageID = 0;
- if (($request = RequestHandler::getInstance()->getActiveRequest()) !== null) {
- $pageID = $request->getPageID();
+ if (!$this->disablePageLayout) {
+ if (($request = RequestHandler::getInstance()->getActiveRequest()) !== null) {
+ $pageID = $request->getPageID();
+ }
}
// load box layout for active page
}
}
}
+
+ /**
+ * Disables the loading of the box layout for the active page.
+ */
+ public function disablePageLayout() {
+ $this->disablePageLayout = true;
+ }
}
<?php
namespace wcf\system\exception;
+use wcf\system\box\BoxHandler;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
* Shows a styled page with the given error message.
*/
public function show() {
+ BoxHandler::getInstance()->disablePageLayout();
SessionHandler::getInstance()->disableTracking();
WCF::getTPL()->assign([
<?php
namespace wcf\system\exception;
+use wcf\system\box\BoxHandler;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
* Prints a permission denied exception.
*/
public function show() {
+ BoxHandler::getInstance()->disablePageLayout();
SessionHandler::getInstance()->disableTracking();
@header('HTTP/1.0 403 Forbidden');