From: Evan Prodromou Date: Fri, 4 Jun 2010 19:47:26 +0000 (-0400) Subject: Only show local public notices in sitemap X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3a34d7e4ea5cf126aad41d9699186026b3587654;p=quix0rs-gnu-social.git Only show local public notices in sitemap Only show local public notices in sitemap. Only do counts for them in the sitemap index, and only show them in the notice sitemap. --- diff --git a/plugins/Sitemap/Sitemap_notice_count.php b/plugins/Sitemap/Sitemap_notice_count.php index 673417b788..2a375b3e48 100644 --- a/plugins/Sitemap/Sitemap_notice_count.php +++ b/plugins/Sitemap/Sitemap_notice_count.php @@ -208,6 +208,7 @@ class Sitemap_notice_count extends Memcached_DataObject { $notice = new Notice(); $notice->whereAdd('created BETWEEN "'.$d.' 00:00:00" AND "'.self::incrementDay($d).' 00:00:00"'); + $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC); $n = $notice->count(); return $n; diff --git a/plugins/Sitemap/noticesitemap.php b/plugins/Sitemap/noticesitemap.php index 9f323f72aa..7d9d2e5d68 100644 --- a/plugins/Sitemap/noticesitemap.php +++ b/plugins/Sitemap/noticesitemap.php @@ -105,7 +105,7 @@ class NoticesitemapAction extends SitemapAction $notice->whereAdd("created >= '$begindt'"); $notice->whereAdd("created < '$enddt'"); - $notice->whereAdd('is_local != 0'); + $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC); $notice->orderBy('created');