From a9e542653439e685ae7505e1d3e0b2f5afb81780 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 26 Apr 2015 19:28:56 +0200 Subject: [PATCH] Fixed primary page menu item differing from primary application --- .../lib/system/request/FlexibleRoute.class.php | 2 +- .../lib/system/request/RequestHandler.class.php | 15 --------------- .../files/lib/system/request/Route.class.php | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php b/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php index b9397e1353..ceefd0e095 100644 --- a/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php +++ b/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php @@ -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; } } diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 6d926c62cb..dbd4fb3996 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -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; } diff --git a/wcfsetup/install/files/lib/system/request/Route.class.php b/wcfsetup/install/files/lib/system/request/Route.class.php index 2d95204a97..71c4aea58a 100644 --- a/wcfsetup/install/files/lib/system/request/Route.class.php +++ b/wcfsetup/install/files/lib/system/request/Route.class.php @@ -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; } } -- 2.20.1