]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice_tag.php
New NoticeStream class to reify streams of notices
[quix0rs-gnu-social.git] / classes / Notice_tag.php
index 81d346c5d3b2a5da148186492ff0f186175ff29c..813242253dbd2d7dc2706c5188f2e293b8defc5c 100644 (file)
@@ -36,14 +36,13 @@ class Notice_tag extends Memcached_DataObject
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
-    static function getStream($tag, $offset=0, $limit=20) {
-
-        $ids = Notice::stream(array('Notice_tag', '_streamDirect'),
-                              array($tag),
-                              'notice_tag:notice_ids:' . Cache::keyize($tag),
-                              $offset, $limit);
-
-        return Notice::getStreamByIds($ids);
+    static function getStream($tag, $offset=0, $limit=20, $sinceId=0, $maxId=0)
+    {
+        $stream = new NoticeStream(array('Notice_tag', '_streamDirect'),
+                                   array($tag),
+                                   'notice_tag:notice_ids:' . Cache::keyize($tag));
+        
+        return $stream->getNotices($offset, $limit, $sinceId, $maxId);
     }
 
     function _streamDirect($tag, $offset, $limit, $since_id, $max_id)