From: Marcel Werk Date: Sun, 18 Dec 2016 17:32:37 +0000 (+0100) Subject: Fixed title of the landing page in breadcrumbs X-Git-Tag: 3.0.0_RC_2~26 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35d14bfbb7f2fad0df8b0694c463248b63b30ce2;p=GitHub%2FWoltLab%2FWCF.git Fixed title of the landing page in breadcrumbs --- diff --git a/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php b/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php index ee0ed7e69e..dc74dab401 100644 --- a/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php +++ b/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php @@ -5,6 +5,7 @@ use wcf\data\ITitledLinkObject; use wcf\system\exception\SystemException; use wcf\system\request\RequestHandler; use wcf\system\SingletonFactory; +use wcf\system\WCF; /** * Handles page locations for use with menu active markings. @@ -98,6 +99,10 @@ class PageLocationManager extends SingletonFactory { $title = $page->getTitle(); } + if ($page->isLandingPage) { + $title = WCF::getLanguage()->get(PAGE_TITLE); + } + $this->stack[] = [ 'identifier' => $identifier, 'link' => $link, @@ -134,13 +139,19 @@ class PageLocationManager extends SingletonFactory { $page = PageCache::getInstance()->getPage($location['pageID']); while ($page !== null && $page->parentPageID) { $page = PageCache::getInstance()->getPage($page->parentPageID); + if ($page->isLandingPage) { + $title = WCF::getLanguage()->get(PAGE_TITLE); + } + else { + $title = $page->getTitle(); + } $this->stack[] = [ 'identifier' => $page->identifier, 'link' => $page->getLink(), 'pageID' => $page->pageID, 'pageObjectID' => 0, - 'title' => $page->getTitle(), + 'title' => $title, 'useAsParentLocation' => false ]; }