From 35d14bfbb7f2fad0df8b0694c463248b63b30ce2 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 18 Dec 2016 18:32:37 +0100 Subject: [PATCH] Fixed title of the landing page in breadcrumbs --- .../lib/system/page/PageLocationManager.class.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 ]; } -- 2.20.1