]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/filteringnoticestream.php
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
[quix0rs-gnu-social.git] / lib / filteringnoticestream.php
index a3bdc08af697746be4c663a78b99d89896a6252a..f41221107418857b2f4fddd40e4f45b909ac3152 100644 (file)
@@ -56,7 +56,7 @@ abstract class FilteringNoticeStream extends NoticeStream
 
     abstract function filter($notice);
 
-    function getNotices($offset, $limit, $sinceId, $maxId)
+    function getNotices($offset, $limit, $sinceId=null, $maxId=null)
     {
         // "offset" is virtual; we have to get a lot
         $total = $offset + $limit;
@@ -84,7 +84,7 @@ abstract class FilteringNoticeStream extends NoticeStream
             while ($raw->fetch()) {
                 if ($this->filter($raw)) {
                     $filtered[] = clone($raw);
-                    if (count($filtered >= $total)) {
+                    if (count($filtered) >= $total) {
                         break;
                     }
                 }
@@ -107,7 +107,7 @@ abstract class FilteringNoticeStream extends NoticeStream
         $ids = array();
 
         while ($notices->fetch()) {
-            $ids[] = $notice->id;
+            $ids[] = $notices->id;
         }
 
         return $ids;