Merge pull request #124 from icecaster/ss4
Date formatting broken in xml templates
This commit is contained in:
commit
d88ed57a07
|
@ -402,7 +402,7 @@ class GoogleSitemap
|
||||||
->limit($countPerFile, ($i - 1) * $countPerFile)
|
->limit($countPerFile, ($i - 1) * $countPerFile)
|
||||||
->last();
|
->last();
|
||||||
|
|
||||||
$lastModified = ($sliced) ? $sliced->dbObject('LastEdited')->Format('Y-m-d') : date('Y-m-d');
|
$lastModified = ($sliced) ? date('Y-m-d', strtotime($sliced->LastEdited)): date('Y-m-d');
|
||||||
|
|
||||||
$sitemaps->push(new ArrayData(array(
|
$sitemaps->push(new ArrayData(array(
|
||||||
'ClassName' => $this->sanitiseClassName($class),
|
'ClassName' => $this->sanitiseClassName($class),
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
<% loop $Items %>
|
<% loop $Items %>
|
||||||
<url>
|
<url>
|
||||||
<loc>$AbsoluteLink</loc>
|
<loc>$AbsoluteLink</loc>
|
||||||
<% if $LastEdited %><lastmod>$LastEdited.Format(c)</lastmod><% end_if %>
|
<% if $LastEdited %><lastmod>$LastEdited.Format(YYYY-MM-dd)</lastmod><% end_if %>
|
||||||
<% if $ChangeFrequency %><changefreq>$ChangeFrequency</changefreq><% end_if %>
|
<% if $ChangeFrequency %><changefreq>$ChangeFrequency</changefreq><% end_if %>
|
||||||
<% if $GooglePriority %><priority>$GooglePriority</priority><% end_if %>
|
<% if $GooglePriority %><priority>$GooglePriority</priority><% end_if %>
|
||||||
</url>
|
</url>
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
</urlset>
|
</urlset>
|
||||||
|
|
Loading…
Reference in New Issue