From: Joshua Rüsweg Date: Sun, 11 Jun 2017 14:16:08 +0000 (+0200) Subject: add `allowSpidersToIndex` filter for pages X-Git-Tag: 3.1.0_Alpha_1~376 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c501ca6c79dcf1dc9164db8b8379e9d8e7c555e;p=GitHub%2FWoltLab%2FWCF.git add `allowSpidersToIndex` filter for pages --- 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 ea69aa92b1..202df21297 100644 --- a/wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php +++ b/wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php @@ -35,6 +35,7 @@ class MultilingualPageSitemapObject extends AbstractSitemapObjectObjectType { $pageList->sqlConditionJoins = 'LEFT JOIN wcf'. WCF_N .'_page page ON (page_content.pageID = page.pageID)'; $pageList->sqlJoins = 'LEFT JOIN wcf'. WCF_N .'_page page ON (page_content.pageID = page.pageID)'; $pageList->getConditionBuilder()->add('page.isMultilingual = ?', [1]); + $pageList->getConditionBuilder()->add('page.allowSpidersToIndex = ?', [1]); return $pageList; } diff --git a/wcfsetup/install/files/lib/system/sitemap/object/SimplePageSitemapObject.class.php b/wcfsetup/install/files/lib/system/sitemap/object/SimplePageSitemapObject.class.php index d65c277b9d..67c53cf272 100644 --- a/wcfsetup/install/files/lib/system/sitemap/object/SimplePageSitemapObject.class.php +++ b/wcfsetup/install/files/lib/system/sitemap/object/SimplePageSitemapObject.class.php @@ -27,11 +27,12 @@ class SimplePageSitemapObject extends AbstractSitemapObjectObjectType { * @inheritDoc */ public function getObjectList() { - /** @var $classList PageList */ - $classList = parent::getObjectList(); - $classList->getConditionBuilder()->add('isMultilingual = ?', [0]); + /** @var $pageList PageList */ + $pageList = parent::getObjectList(); + $pageList->getConditionBuilder()->add('isMultilingual = ?', [0]); + $pageList->getConditionBuilder()->add('page.allowSpidersToIndex = ?', [1]); - return $classList; + return $pageList; } /**