X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticelist.php;h=91acbb8d580b6c8bb72b4de58c1f9b9d9a50fe6e;hb=ba4bda9beb8b51eb53c47ac32e435179cb9eecde;hp=148f428edf0955420c58a7510b70c31ce1bf3def;hpb=8b32ac85d8cbfe1be03836af461d80fddd54fc6c;p=quix0rs-gnu-social.git diff --git a/lib/noticelist.php b/lib/noticelist.php index 148f428edf..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,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)); } } }