Merge pull request #16 from joernroeder/master

ENHANCEMENT: Remove SiteTree dependencies.
This commit is contained in:
Will Rossiter 2012-05-11 15:22:20 -07:00
commit a72dd1a094
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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();