Custom urls no longer affect acp links
authorMarcel Werk <burntime@woltlab.com>
Sat, 27 Aug 2016 18:36:28 +0000 (20:36 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 27 Aug 2016 18:36:28 +0000 (20:36 +0200)
wcfsetup/install/files/lib/system/request/ControllerMap.class.php

index 3dbf6e096f29eaf5d0b83fa04e771ef96a159722..214b66aa8b0235dd1a286c6605145af9339c3502 100644 (file)
@@ -5,6 +5,7 @@ use wcf\system\cache\builder\RoutingCacheBuilder;
 use wcf\system\exception\SystemException;
 use wcf\system\SingletonFactory;
 use wcf\system\WCF;
+use wcf\system\WCFACP;
 
 /**
  * Resolves incoming requests and performs lookups for controller to url mappings.
@@ -81,7 +82,7 @@ class ControllerMap extends SingletonFactory {
                if ($classData === null) {
                        throw new SystemException("Unknown controller '" . $controller . "'");
                }
-               else {
+               else if (!$isAcpRequest) {
                        // handle controllers with a custom url
                        $controller = $classData['controller'];
                        
@@ -152,7 +153,7 @@ class ControllerMap extends SingletonFactory {
                        return $this->lookupCache[$lookupKey];
                }
                
-               if (isset($this->customUrls['reverse'][$application]) && isset($this->customUrls['reverse'][$application][$controller])) {
+               if (!class_exists(WCFACP::class, false) && isset($this->customUrls['reverse'][$application]) && isset($this->customUrls['reverse'][$application][$controller])) {
                        $urlController = $this->customUrls['reverse'][$application][$controller];
                }
                else {