let Inbox class go fingerpokin' in streams

This commit is contained in:
Evan Prodromou 2011-03-23 11:42:52 -04:00
parent 0b35ce7c37
commit efb6a7b441
2 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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();