]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Sitemap/Sitemap_notice_count.php
fix use of activity rather than act in salmonaction subclasses, too
[quix0rs-gnu-social.git] / plugins / Sitemap / Sitemap_notice_count.php
index 673417b788471ea816baf24b1451b086552fe67a..6e0061e97b083d5c07dd7ca7769f3a8e0fe49e06 100644 (file)
@@ -153,7 +153,9 @@ class Sitemap_notice_count extends Memcached_DataObject
                 $noticeCounts[$snc->notice_date] = $snc->notice_count;
             }
 
-            self::cacheSet('sitemap:notice:counts', $noticeCounts);
+            // Cache notice counts for 4 hours.
+
+            self::cacheSet('sitemap:notice:counts', $noticeCounts, null, time() + 4 * 60 * 60);
         }
 
         return $noticeCounts;
@@ -208,6 +210,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;