mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
BUGFIX Fixed SSDatetime references in GoogleSitemap, making the module 2.4 only (#4710)
This commit is contained in:
parent
100e326861
commit
b8ae8755d5
1
README
1
README
@ -9,6 +9,7 @@ Will Rossiter
|
|||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
SilverStripe 2.4 or newer
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
@ -62,9 +62,9 @@ class GoogleSitemap extends Controller {
|
|||||||
// The one field that isn't easy to deal with in the template is
|
// The one field that isn't easy to deal with in the template is
|
||||||
// Change frequency, so we set that here.
|
// Change frequency, so we set that here.
|
||||||
$properties = $page->toMap();
|
$properties = $page->toMap();
|
||||||
$created = new SSDatetime();
|
$created = new SS_Datetime();
|
||||||
$created->value = $properties['Created'];
|
$created->value = $properties['Created'];
|
||||||
$now = new SSDatetime();
|
$now = new SS_Datetime();
|
||||||
$now->value = date('Y-m-d H:i:s');
|
$now->value = date('Y-m-d H:i:s');
|
||||||
$versions = $properties['Version'];
|
$versions = $properties['Version'];
|
||||||
$timediff = $now->format('U') - $created->format('U');
|
$timediff = $now->format('U') - $created->format('U');
|
||||||
|
Loading…
Reference in New Issue
Block a user