Remove obsolete checks for `!PACKAGE_ID` / `NO_IMPORTS`
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 19 May 2022 08:33:50 +0000 (10:33 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 19 May 2022 08:33:50 +0000 (10:33 +0200)
see #4818

wcfsetup/install/files/lib/system/template/TemplateEngine.class.php
wcfsetup/install/files/lib/util/HeaderUtil.class.php

index 49e5f8f5b8c8bcc155a3800a35d3c13f54844695..48a80584165e1d710d3ae0fdea5c181eca7c77bb 100755 (executable)
@@ -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');
         }
     }
 
index 43c18d421bfa037cfb0e352118dd4161cfd9e12e..b809c6843e3821ad14e33dd425dc611ebccc3e3e 100644 (file)
@@ -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']);
     }
 
     /**