From: Tim Düsterhus Date: Fri, 20 May 2022 13:01:39 +0000 (+0200) Subject: Rewrite condition in RequestHandler::buildRequest() to be more clear X-Git-Tag: 6.0.0_Alpha_1~1259^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=624d42f1f6886fc22bb9967a9af611b7fb819b27;p=GitHub%2FWoltLab%2FWCF.git Rewrite condition in RequestHandler::buildRequest() to be more clear It now has an explicit “then” (ACP) and “else” (Frontend) part. --- diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index c5ae62979c..43e6ae36a9 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -122,8 +122,12 @@ final class RequestHandler extends SingletonFactory try { $routeData = RouteHandler::getInstance()->getRouteData(); - // handle landing page for frontend requests - if (!$this->isACPRequest()) { + if ($this->isACPRequest()) { + if (empty($routeData['controller'])) { + $routeData['controller'] = 'index'; + } + } else { + // handle landing page for frontend requests $routeData = $this->handleDefaultController($application, $routeData); // check if accessing from the wrong domain (e.g. "www." omitted but domain was configured with) @@ -143,8 +147,6 @@ final class RequestHandler extends SingletonFactory exit; } - } elseif (empty($routeData['controller'])) { - $routeData['controller'] = 'index'; } if (isset($routeData['className'])) {