X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticelist.php;h=91acbb8d580b6c8bb72b4de58c1f9b9d9a50fe6e;hb=ba4bda9beb8b51eb53c47ac32e435179cb9eecde;hp=a4781d9daa7a077cb33917eaad1c931501e94149;hpb=575ecd9f4c7e2544f1ae43e7838f1be6a9af4dc4;p=quix0rs-gnu-social.git diff --git a/lib/noticelist.php b/lib/noticelist.php index a4781d9daa..91acbb8d58 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -124,6 +124,12 @@ class NoticeList extends Widget static function prefill(&$notices, $avatarSize=AVATAR_STREAM_SIZE) { + // Prefill attachments + Notice::fillAttachments($notices); + // Prefill attachments + Notice::fillFaves($notices); + // Prefill repeat data + Notice::fillRepeats($notices); // Prefill the profiles $profiles = Notice::fillProfiles($notices); // Prefill the avatars @@ -131,14 +137,16 @@ class NoticeList extends Widget $p = Profile::current(); - $ids = array(); + if (!empty($p)) { + + $ids = array(); - foreach ($notices as $notice) { - $ids[] = $notice->id; - } + foreach ($notices as $notice) { + $ids[] = $notice->id; + } - if (!empty($p)) { Memcached_DataObject::pivotGet('Fave', 'notice_id', $ids, array('user_id' => $p->id)); + Memcached_DataObject::pivotGet('Notice', 'repeat_of', $ids, array('profile_id' => $p->id)); } } }