Upgrades for 3.1 compatibility

This commit is contained in:
Will Rossiter 2013-03-26 22:30:38 +13:00
parent c69a4a58ae
commit c6119d3de9
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
// add the extension to pages
if (class_exists('SiteTree')) {
Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeExtension');
SiteTree::add_extension('GoogleSitemapSiteTreeExtension');
}
// if you need to add this to DataObjects include the following in

View File

@ -60,7 +60,7 @@ class GoogleSitemap {
*/
public static function register_dataobject($className, $changeFreq = 'monthly', $priority = '0.6') {
if (!self::is_registered($className)) {
Object::add_extension($className, 'GoogleSitemapExtension');
$className::add_extension('GoogleSitemapExtension');
self::$dataobjects[$className] = array(
'frequency' => ($changeFreq) ? $changeFreq : 'monthly',

View File

@ -10,6 +10,6 @@
"email": "will@fullscreen.io"
}],
"require": {
"silverstripe/framework": "3.0.*"
"silverstripe/framework": ">=3.1.*"
}
}