mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Merge pull request #16 from joernroeder/master
ENHANCEMENT: Remove SiteTree dependencies.
This commit is contained in:
commit
a72dd1a094
@ -6,7 +6,7 @@ Director::addRules(10, array(
|
||||
));
|
||||
|
||||
// add the extension to pages
|
||||
Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeDecorator');
|
||||
if (class_exists('SiteTree')) Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeDecorator');
|
||||
|
||||
// if you need to add this to DataObjects include the following in
|
||||
// your own _config:
|
||||
|
@ -143,7 +143,7 @@ class GoogleSitemap extends Controller {
|
||||
$filter = "{$bt}ShowInSearch{$bt} = 1";
|
||||
}
|
||||
|
||||
$pages = Versioned::get_by_stage('SiteTree', 'Live', $filter);
|
||||
$pages = class_exists('SiteTree') ? Versioned::get_by_stage('SiteTree', 'Live', $filter) : false;
|
||||
|
||||
$newPages = new ArrayList();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user