summaryrefslogtreecommitdiff
path: root/plugins/Sitemap/noticesitemap.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-25 23:56:09 -0400
committerEvan Prodromou <evan@status.net>2010-06-01 13:52:27 -0700
commit0a04f9d49db4f28ace3f3d94ec0763a926296b44 (patch)
treece67eeccf78451ab3ae45cb4a963839231197fc9 /plugins/Sitemap/noticesitemap.php
parent524cd9df936bd27d5b64fbf08b219b56cb071122 (diff)
better query for notices by date
Diffstat (limited to 'plugins/Sitemap/noticesitemap.php')
-rw-r--r--plugins/Sitemap/noticesitemap.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/Sitemap/noticesitemap.php b/plugins/Sitemap/noticesitemap.php
index 7eec88636..002408486 100644
--- a/plugins/Sitemap/noticesitemap.php
+++ b/plugins/Sitemap/noticesitemap.php
@@ -68,9 +68,12 @@ class NoticesitemapAction extends SitemapAction
$this->notice = new Notice();
- $this->notice->whereAdd("created > '$y-$m-$d 00:00:00'");
- $this->notice->whereAdd("created <= '$y-$m-$d 11:59:59'");
- $this->notice->whereAdd('is_local = 1');
+ $dt = sprintf('%04d-%02d-%02d', $y, $m, $d);
+
+ $this->notice->whereAdd("created > '$dt 00:00:00'");
+ $this->notice->whereAdd("created <= '$dt 23:59:59'");
+
+ $this->notice->whereAdd('is_local != 0');
$this->notice->orderBy('id');
$this->notice->limit($offset, $limit);