mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Exclude all Redirector templates, not just RedirectorPage
Classes that extend RedirectorPage are still included in the sitemap if exclude_redirector_pages is enabled. This change excludes all subclasses as well.
This commit is contained in:
parent
6fd2901aaf
commit
4701bd985a
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user