summaryrefslogtreecommitdiff
path: root/sitemap.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-08-12 08:18:32 -0400
committerEvan Prodromou <evan@prodromou.name>2008-08-12 08:18:32 -0400
commit07d04def5e1eae50ad675d9bd62ab7b18cb69bc8 (patch)
tree18fac80794008ffaca838abb286f533262b515b9 /sitemap.php
parente5565ddcab9de0af337e084c925548a2ccf370e4 (diff)
correctly show URL for rare notice without an URI
darcs-hash:20080812121832-84dde-dad220ddc4c67e017aa10e47e3aed85392d606ca.gz
Diffstat (limited to 'sitemap.php')
-rw-r--r--sitemap.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/sitemap.php b/sitemap.php
index 8480207be..c35a382a0 100644
--- a/sitemap.php
+++ b/sitemap.php
@@ -82,7 +82,7 @@ function notices_map() {
$notices = DB_DataObject::factory('notice');
- $notices->query('SELECT uri, url, modified FROM notice');
+ $notices->query('SELECT id, uri, url, modified FROM notice');
$notice_count = 0;
$map_count = 1;
@@ -97,11 +97,11 @@ function notices_map() {
# remote notices have an URL
- if (!$notices->url) {
+ if (!$notices->url && $notices->uri) {
$notice = array(
- 'url' => $notices->uri,
+ 'url' => ($notices->uri) ? $notices->uri : common_local_url('shownotice', array('notice' => $notices->id)),
'lastmod' => common_date_w3dtf($notices->modified),
- 'changefreq' => 'daily',
+ 'changefreq' => 'never',
'priority' => '1',
);