Fixed default controller causing a redirect if it was renamed
authorAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jun 2015 19:24:37 +0000 (21:24 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jun 2015 19:24:37 +0000 (21:24 +0200)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index a596ce798decc1eb60cd44d9587be80cb2ad1b72..eebd1982f7a9dcaf288812f27976feccbeed7099 100644 (file)
@@ -301,6 +301,13 @@ class RequestHandler extends SingletonFactory {
                if ($landingPageApplication == $application) {
                        $routeData['controller'] = $landingPage->getController();
                        if (!URL_LEGACY_MODE) $routeData['controller'] = self::getTokenizedController($routeData['controller']);
+                       
+                       // use alias if defined to prevent incorrect recognition
+                       $alias = $this->getAliasByController($routeData['controller']);
+                       if ($alias !== null) {
+                               $routeData['controller'] = $alias;
+                       }
+                       
                        return;
                }