From: Alexander Ebert Date: Fri, 24 Jan 2014 16:17:35 +0000 (+0100) Subject: Invoke IPageMenuItemProvider::getLink() for landing pages X-Git-Tag: 2.0.2~13^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff9b61e6a73117c10e63e03f47731252e4e7b58a;p=GitHub%2FWoltLab%2FWCF.git Invoke IPageMenuItemProvider::getLink() for landing pages --- diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index 5a51c78864..0e2768f93a 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -2,6 +2,7 @@ namespace wcf\system\request; use wcf\data\DatabaseObjectDecorator; use wcf\system\application\ApplicationHandler; +use wcf\system\menu\page\IPageMenuItemProvider; use wcf\system\menu\page\PageMenu; use wcf\system\request\RouteHandler; use wcf\system\Regex; @@ -120,9 +121,14 @@ class LinkHandler extends SingletonFactory { else { // build link to landing page $landingPage = PageMenu::getInstance()->getLandingPage(); - $controller = $landingPage->getController(); - $abbreviation = $landingPage->getApplication(); - $url = $landingPage->menuItemLink; + if ($landingPage instanceof IPageMenuItemProvider) { + return $landingPage->getLink(); + } + else { + $controller = $landingPage->getController(); + $abbreviation = $landingPage->getApplication(); + $url = $landingPage->menuItemLink; + } } }