summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@status.net>2010-08-12 12:55:36 -0700
committerBrion Vibber <brion@status.net>2010-08-12 12:55:36 -0700
commitc3475e6ebef594460ec3685a007e7298fcbd9833 (patch)
treec0d0922f5c74f6b945a96f8caa198798a0980e2f
parent4cf58c4bc79bc2809435c9af0f60b746b898dd58 (diff)
parent78eea352b4ad142e58b598c50929d5a4edb991fc (diff)
Merge branch 'master' into 0.9.x
-rw-r--r--plugins/Sitemap/sitemapaction.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/Sitemap/sitemapaction.php b/plugins/Sitemap/sitemapaction.php
index 45edfccc5..73b9248a3 100644
--- a/plugins/Sitemap/sitemapaction.php
+++ b/plugins/Sitemap/sitemapaction.php
@@ -53,6 +53,8 @@ class SitemapAction extends Action
function handle($args)
{
+ parent::handle($args);
+
header('Content-Type: text/xml; charset=UTF-8');
$this->startXML();
@@ -67,6 +69,27 @@ class SitemapAction extends Action
$this->endXML();
}
+ function lastModified()
+ {
+ $y = $this->trimmed('year');
+
+ $m = $this->trimmed('month');
+ $d = $this->trimmed('day');
+
+ $y += 0;
+ $m += 0;
+ $d += 0;
+
+ $begdate = strtotime("$y-$m-$d 00:00:00");
+ $enddate = $begdate + (24 * 60 * 60);
+
+ if ($enddate < time()) {
+ return $enddate;
+ } else {
+ return null;
+ }
+ }
+
function showUrl($url, $lastMod=null, $changeFreq=null, $priority=null)
{
$this->elementStart('url');