Workaround for landing pages from different app namespaces
authorAlexander Ebert <ebert@woltlab.com>
Fri, 15 Nov 2019 00:01:28 +0000 (01:01 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 15 Nov 2019 00:01:28 +0000 (01:01 +0100)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index 5fbac25b7769513256e0e2881c2afa6c452f5f3f..04dab82b68663b7d69620ff6680f3b830cea898e 100644 (file)
@@ -172,7 +172,12 @@ class RequestHandler extends SingletonFactory {
                                        exit;
                                }
                                
-                               $classData = ControllerMap::getInstance()->resolve($application, $controller, $this->isACPRequest(), RouteHandler::getInstance()->isRenamedController());
+                               $classApplication = $application;
+                               if (!empty($routeData['isDefaultController']) && !empty($routeData['application']) && $routeData['application'] !== $application) {
+                                       $classApplication = $routeData['application'];
+                               }
+                               
+                               $classData = ControllerMap::getInstance()->resolve($classApplication, $controller, $this->isACPRequest(), RouteHandler::getInstance()->isRenamedController());
                                if (is_string($classData)) {
                                        $this->redirect($routeData, $application, $classData);
                                }