Merge pull request #103 from mikenz/patch-1

Exclude all Redirector templates, not just RedirectorPage
This commit is contained in:
Will Rossiter 2016-06-09 13:59:49 +12:00
commit 11a894a10e

View File

@ -227,7 +227,9 @@ class GoogleSitemap extends Object
} }
if($redirector) { if($redirector) {
$instances = $instances->exclude('ClassName', 'RedirectorPage'); foreach (ClassInfo::subclassesFor('RedirectorPage') as $redirectorClass) {
$instances = $instances->exclude('ClassName', $redirectorClass);
}
} }
} elseif ($class == "GoogleSitemapRoute") { } elseif ($class == "GoogleSitemapRoute") {
$instances = array_slice(self::$routes, ($page - 1) * $count, $count); $instances = array_slice(self::$routes, ($page - 1) * $count, $count);