]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelist.php
Merge branch '1.0.x' into 1.1.x
[quix0rs-gnu-social.git] / lib / noticelist.php
index 148f428edf0955420c58a7510b70c31ce1bf3def..91acbb8d580b6c8bb72b4de58c1f9b9d9a50fe6e 100644 (file)
@@ -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));
        }
     }
 }