X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticelist.php;h=91acbb8d580b6c8bb72b4de58c1f9b9d9a50fe6e;hb=f519858044a627e99244b334b7bef3f7f96fa317;hp=7ec5be1c0ff169f9e86b9d8980846bfde66f7c7c;hpb=ff656a8b3a26f977bfebfffc93acb7541f0992cc;p=quix0rs-gnu-social.git diff --git a/lib/noticelist.php b/lib/noticelist.php index 7ec5be1c0f..91acbb8d58 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -128,6 +128,8 @@ class NoticeList extends Widget Notice::fillAttachments($notices); // Prefill attachments Notice::fillFaves($notices); + // Prefill repeat data + Notice::fillRepeats($notices); // Prefill the profiles $profiles = Notice::fillProfiles($notices); // Prefill the avatars @@ -135,13 +137,14 @@ 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)); }