Use `isACPRequest()` method in favor of a local variable in RequestHandler::handle()
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Jul 2021 09:04:44 +0000 (11:04 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Jul 2021 09:04:44 +0000 (11:04 +0200)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index ae8745227fbdaa3ba910aac393f2e5bdc2b704c4..53c46655be6089ca9060bff5baaafe3a9bf43769 100644 (file)
@@ -77,7 +77,7 @@ class RequestHandler extends SingletonFactory
 
             // enforce that certain ACP pages are not available for non-owners in enterprise mode
             if (
-                $isACPRequest
+                $this->isACPRequest()
                 && ENABLE_ENTERPRISE_MODE
                 && \defined($this->activeRequest->getClassName() . '::BLACKLISTED_IN_ENTERPRISE_MODE')
                 && \constant($this->activeRequest->getClassName() . '::BLACKLISTED_IN_ENTERPRISE_MODE')
@@ -87,7 +87,7 @@ class RequestHandler extends SingletonFactory
             }
 
             // handle offline mode
-            if (!$isACPRequest && \defined('OFFLINE') && OFFLINE) {
+            if (!$this->isACPRequest() && \defined('OFFLINE') && OFFLINE) {
                 if (
                     !WCF::getSession()->getPermission('admin.general.canViewPageDuringOfflineMode')
                     && !$this->activeRequest->isAvailableDuringOfflineMode()