mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Upgrades for 3.1 compatibility
This commit is contained in:
parent
c69a4a58ae
commit
c6119d3de9
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// add the extension to pages
|
// add the extension to pages
|
||||||
if (class_exists('SiteTree')) {
|
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
|
// if you need to add this to DataObjects include the following in
|
||||||
|
@ -60,7 +60,7 @@ class GoogleSitemap {
|
|||||||
*/
|
*/
|
||||||
public static function register_dataobject($className, $changeFreq = 'monthly', $priority = '0.6') {
|
public static function register_dataobject($className, $changeFreq = 'monthly', $priority = '0.6') {
|
||||||
if (!self::is_registered($className)) {
|
if (!self::is_registered($className)) {
|
||||||
Object::add_extension($className, 'GoogleSitemapExtension');
|
$className::add_extension('GoogleSitemapExtension');
|
||||||
|
|
||||||
self::$dataobjects[$className] = array(
|
self::$dataobjects[$className] = array(
|
||||||
'frequency' => ($changeFreq) ? $changeFreq : 'monthly',
|
'frequency' => ($changeFreq) ? $changeFreq : 'monthly',
|
||||||
|
@ -10,6 +10,6 @@
|
|||||||
"email": "will@fullscreen.io"
|
"email": "will@fullscreen.io"
|
||||||
}],
|
}],
|
||||||
"require": {
|
"require": {
|
||||||
"silverstripe/framework": "3.0.*"
|
"silverstripe/framework": ">=3.1.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user