Fixed primary page menu item differing from primary application
authorAlexander Ebert <ebert@woltlab.com>
Sun, 26 Apr 2015 17:28:56 +0000 (19:28 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 26 Apr 2015 17:28:56 +0000 (19:28 +0200)
wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php
wcfsetup/install/files/lib/system/request/RequestHandler.class.php
wcfsetup/install/files/lib/system/request/Route.class.php

index b9397e135307801f6f6700204495e14fa0da8957..ceefd0e095a1189459432916f1b6028966abff93 100644 (file)
@@ -150,7 +150,7 @@ class FlexibleRoute implements IRoute {
                                                // check if this is the primary application and the landing page originates to the same application
                                                $primaryApplication = ApplicationHandler::getInstance()->getPrimaryApplication();
                                                $abbreviation = ApplicationHandler::getInstance()->getAbbreviation($primaryApplication->packageID);
-                                               if ($abbreviation != $application || $landingPage === null || $landingPage->getApplication() != 'wcf') {
+                                               if ($abbreviation != $application || $landingPage === null) {
                                                        $ignoreController = true;
                                                }
                                        }
index 6d926c62cb276e222f80a8d61ecaa5c42feeb0b3..dbd4fb399687ae742f14ce50c40166af1c2e9f63 100644 (file)
@@ -303,21 +303,6 @@ class RequestHandler extends SingletonFactory {
                        return;
                }
                
-               // assign the default controller
-               $currentApplication = ApplicationHandler::getInstance()->getApplication($application);
-               if ($controller = WCF::getApplicationObject($currentApplication)->getPrimaryController()) {
-                       $controller = explode('\\', $controller);
-                       
-                       if (URL_LEGACY_MODE) {
-                               HeaderUtil::redirect(LinkHandler::getInstance()->getLink(preg_replace('~(Action|Form|Page)$~', '', array_pop($controller)), array('application' => $controller[0])));
-                               exit;
-                       }
-                       else {
-                               $routeData['controller'] = self::getTokenizedController(preg_replace('~(Action|Form|Page)$~', '', array_pop($controller)));
-                               return;
-                       }
-               }
-               
                HeaderUtil::redirect($landingPage->getLink());
                exit;
        }
index 2d95204a97166f5aa7add691dc4ded38c7bf3876..71c4aea58aa887bc7b5993f592b5f5ff6080f06c 100644 (file)
@@ -287,7 +287,7 @@ class Route implements IRoute {
                                                // check if this is the primary application and the landing page originates to the same application
                                                $primaryApplication = ApplicationHandler::getInstance()->getPrimaryApplication();
                                                $abbreviation = ApplicationHandler::getInstance()->getAbbreviation($primaryApplication->packageID);
-                                               if ($abbreviation != $application || $landingPage === null || $landingPage->getApplication() != 'wcf') {
+                                               if ($abbreviation != $application || $landingPage === null) {
                                                        $ignoreController = true;
                                                }
                                        }