From f6fc7f6ddef5a78e3f3532e036d1cfc9810af5ef Mon Sep 17 00:00:00 2001 From: Olaf Braun Date: Thu, 25 Jan 2024 13:22:24 +0100 Subject: [PATCH] Only load page content for active languages (#5773) * Only load page content for active languages * Typo --------- Co-authored-by: Alexander Ebert --- .../sitemap/object/MultilingualPageSitemapObject.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php b/wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php index 653f0e0896..0942d4874f 100644 --- a/wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php +++ b/wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php @@ -9,6 +9,7 @@ use wcf\data\page\Page; use wcf\page\AbstractPage; use wcf\system\exception\IllegalLinkException; use wcf\system\exception\PermissionDeniedException; +use wcf\system\language\LanguageFactory; /** * Multilingual page sitemap implementation. @@ -44,6 +45,9 @@ class MultilingualPageSitemapObject extends AbstractSitemapObjectObjectType ON page_content.pageID = page.pageID'; $pageList->getConditionBuilder()->add('page.isMultilingual = ?', [1]); $pageList->getConditionBuilder()->add('page.allowSpidersToIndex = ?', [1]); + $pageList->getConditionBuilder()->add('page_content.languageID IN (?)', [ + \array_keys(LanguageFactory::getInstance()->getLanguages()) + ]); return $pageList; } -- 2.20.1