From: Tim Düsterhus Date: Thu, 19 May 2022 08:33:50 +0000 (+0200) Subject: Remove obsolete checks for `!PACKAGE_ID` / `NO_IMPORTS` X-Git-Tag: 6.0.0_Alpha_1~1275 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4ad16e40fad3cd8ff3084e7cbcf9caad14cffbb;p=GitHub%2FWoltLab%2FWCF.git Remove obsolete checks for `!PACKAGE_ID` / `NO_IMPORTS` see #4818 --- diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index 49e5f8f5b8..48a8058416 100755 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -318,10 +318,7 @@ class TemplateEngine extends SingletonFactory if ($sendHeaders) { HeaderUtil::sendHeaders(); - // call beforeDisplay event - if (!\defined('NO_IMPORTS')) { - EventHandler::getInstance()->fireAction($this, 'beforeDisplay'); - } + EventHandler::getInstance()->fireAction($this, 'beforeDisplay'); } $sourceFilename = $this->getSourceFilename($templateName, $application); @@ -348,10 +345,7 @@ class TemplateEngine extends SingletonFactory include($compiledFilename); if ($sendHeaders) { - // call afterDisplay event - if (!\defined('NO_IMPORTS')) { - EventHandler::getInstance()->fireAction($this, 'afterDisplay'); - } + EventHandler::getInstance()->fireAction($this, 'afterDisplay'); } } diff --git a/wcfsetup/install/files/lib/util/HeaderUtil.class.php b/wcfsetup/install/files/lib/util/HeaderUtil.class.php index 43c18d421b..b809c6843e 100644 --- a/wcfsetup/install/files/lib/util/HeaderUtil.class.php +++ b/wcfsetup/install/files/lib/util/HeaderUtil.class.php @@ -86,15 +86,13 @@ final class HeaderUtil @\header('Content-Type: text/html; charset=UTF-8'); // send no cache headers - if (!PACKAGE_ID || !WCF::getSession()->spiderID) { + if (!WCF::getSession()->spiderID) { self::sendNoCacheHeaders(); } @\header('X-Frame-Options: SAMEORIGIN'); - if (!\defined('NO_IMPORTS')) { - \ob_start([self::class, 'parseOutput']); - } + \ob_start([self::class, 'parseOutput']); } /**