$total = count($notices);
$notices = array_slice($notices, 0, NOTICES_PER_PAGE);
- self::prefill($notices);
+ self::prefill(self::_allNotices($notices));
$conversations = array();
return $total;
}
+ function _allNotices($notices)
+ {
+ $convId = array();
+ foreach ($notices as $notice) {
+ $convId[] = $notice->conversation;
+ }
+ $convId = array_unique($convId);
+ $allMap = Memcached_DataObject::listGet('Notice', 'conversation', $convId);
+ $allArray = array();
+ foreach ($allMap as $convId => $convNotices) {
+ $allArray = array_merge($allArray, $convNotices);
+ }
+ return $allArray;
+ }
+
/**
* returns a new list item for the current notice
*