add `allowSpidersToIndex` filter for pages
authorJoshua Rüsweg <josh@bastelstu.be>
Sun, 11 Jun 2017 14:16:08 +0000 (16:16 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Sun, 11 Jun 2017 14:16:08 +0000 (16:16 +0200)
wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php
wcfsetup/install/files/lib/system/sitemap/object/SimplePageSitemapObject.class.php

index ea69aa92b15cbbbae576b17099de86454aa37108..202df2129794fc3536c060d52a74896376a3da95 100644 (file)
@@ -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;
        }
index d65c277b9d539af10c727709d7ab7c303ac9c628..67c53cf27245045039d573aee4dc8a73c235d197 100644 (file)
@@ -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;
        }
        
        /**