forked from GNUsocial/gnu-social
let Inbox class go fingerpokin' in streams
This commit is contained in:
parent
0b35ce7c37
commit
efb6a7b441
@ -233,7 +233,7 @@ class Inbox extends Memcached_DataObject
|
||||
// Do a bulk lookup for the first $limit items
|
||||
// Fast path when nothing's deleted.
|
||||
$firstChunk = array_slice($ids, 0, $offset + $limit);
|
||||
$notices = Notice::getStreamByIds($firstChunk);
|
||||
$notices = NoticeStream::getStreamByIds($firstChunk);
|
||||
|
||||
assert($notices instanceof ArrayWrapper);
|
||||
$items = $notices->_items;
|
||||
@ -292,7 +292,7 @@ class Inbox extends Memcached_DataObject
|
||||
// Do a bulk lookup for the first $limit items
|
||||
// Fast path when nothing's deleted.
|
||||
$firstChunk = array_slice($ids, 0, $limit);
|
||||
$notices = Notice::getStreamByIds($firstChunk);
|
||||
$notices = NoticeStream::getStreamByIds($firstChunk);
|
||||
|
||||
$wanted = count($firstChunk); // raw entry count in the inbox up to our $limit
|
||||
if ($notices->N >= $wanted) {
|
||||
|
@ -62,7 +62,7 @@ class NoticeStream
|
||||
{
|
||||
$ids = $this->getNoticeIds($offset, $limit, $sinceId, $maxId);
|
||||
|
||||
$notices = $this->getStreamByIds($ids);
|
||||
$notices = self::getStreamByIds($ids);
|
||||
|
||||
return $notices;
|
||||
}
|
||||
@ -136,7 +136,7 @@ class NoticeStream
|
||||
return $ids;
|
||||
}
|
||||
|
||||
function getStreamByIds($ids)
|
||||
static function getStreamByIds($ids)
|
||||
{
|
||||
$cache = Cache::instance();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user