From c6119d3de95c8ecf8faa681ce3165f2ab0a160cd Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Tue, 26 Mar 2013 22:30:38 +1300 Subject: [PATCH] Upgrades for 3.1 compatibility --- _config.php | 2 +- code/GoogleSitemap.php | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_config.php b/_config.php index ee3c4b1..07af9ac 100644 --- a/_config.php +++ b/_config.php @@ -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 diff --git a/code/GoogleSitemap.php b/code/GoogleSitemap.php index adf4451..b95ef0a 100644 --- a/code/GoogleSitemap.php +++ b/code/GoogleSitemap.php @@ -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', diff --git a/composer.json b/composer.json index b97dfbe..053482b 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,6 @@ "email": "will@fullscreen.io" }], "require": { - "silverstripe/framework": "3.0.*" + "silverstripe/framework": ">=3.1.*" } }