X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FReply.php;h=9ba623ba3fea630d9f8a3fb76e5265dbf5f3a2fb;hb=e862dcdb8a9cfc21cf00513d76f40d20dd3b1b7a;hp=dc6296bda347b9f78e8e31fa856a5f1c7681670c;hpb=819d33210d298de74b64dc7ead79e9d9b223b12e;p=quix0rs-gnu-social.git diff --git a/classes/Reply.php b/classes/Reply.php index dc6296bda3..9ba623ba3f 100644 --- a/classes/Reply.php +++ b/classes/Reply.php @@ -38,40 +38,8 @@ class Reply extends Memcached_DataObject function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0) { - $ids = Notice::stream(array('Reply', '_streamDirect'), - array($user_id), - 'reply:stream:' . $user_id, - $offset, $limit, $since_id, $max_id); - return $ids; - } - - function _streamDirect($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0) - { - $reply = new Reply(); - $reply->profile_id = $user_id; - - if ($since_id != 0) { - $reply->whereAdd('notice_id > ' . $since_id); - } - - if ($max_id != 0) { - $reply->whereAdd('notice_id < ' . $max_id); - } - - $reply->orderBy('notice_id DESC'); - - if (!is_null($offset)) { - $reply->limit($offset, $limit); - } - - $ids = array(); - - if ($reply->find()) { - while ($reply->fetch()) { - $ids[] = $reply->notice_id; - } - } + $stream = new ReplyNoticeStream($user_id); - return $ids; + return $stream->getNotices($offset, $limit, $since_id, $max_id); } }