From: Alexander Ebert Date: Sun, 26 Apr 2015 17:28:56 +0000 (+0200) Subject: Fixed primary page menu item differing from primary application X-Git-Tag: 2.1.4~42^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9e542653439e685ae7505e1d3e0b2f5afb81780;p=GitHub%2FWoltLab%2FWCF.git Fixed primary page menu item differing from primary application --- 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; } }