From: Tim Düsterhus Date: Wed, 1 Jun 2022 12:02:03 +0000 (+0200) Subject: Check the landing page against PageCache::getLandingPage() in PageLocationManager X-Git-Tag: 6.0.0_Alpha_1~1219^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bef107beccc4ecb7d69f8afea932213af35978c4;p=GitHub%2FWoltLab%2FWCF.git Check the landing page against PageCache::getLandingPage() in PageLocationManager The landing page returned by `PageCache` is the landing page as used everywhere else. Use that one instead of checking the property for consistency. --- diff --git a/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php b/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php index 24ff00c126..aced2cd366 100644 --- a/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php +++ b/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php @@ -108,7 +108,8 @@ class PageLocationManager extends SingletonFactory $title = $page->getTitle(); } - if ($page->isLandingPage && BREADCRUMBS_HOME_USE_PAGE_TITLE) { + $landingPage = PageCache::getInstance()->getLandingPage(); + if ($page->pageID == $landingPage->pageID && BREADCRUMBS_HOME_USE_PAGE_TITLE) { $title = WCF::getLanguage()->get(PAGE_TITLE); } @@ -148,13 +149,14 @@ class PageLocationManager extends SingletonFactory if ($location['pageID']) { $page = PageCache::getInstance()->getPage($location['pageID']); + $landingPage = PageCache::getInstance()->getLandingPage(); while ($page !== null && $page->parentPageID) { $page = PageCache::getInstance()->getPage($page->parentPageID); if (!$page->isVisible()) { continue; } - if ($page->isLandingPage && BREADCRUMBS_HOME_USE_PAGE_TITLE) { + if ($page->pageID == $landingPage->pageID && BREADCRUMBS_HOME_USE_PAGE_TITLE) { $title = WCF::getLanguage()->get(PAGE_TITLE); } else { $title = $page->getTitle();