]> 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 a15755eef1a9994f6efcf2a45e008ba1e720f479..91acbb8d580b6c8bb72b4de58c1f9b9d9a50fe6e 100644 (file)
@@ -126,6 +126,10 @@ class NoticeList extends Widget
     {
         // 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
@@ -133,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));
        }
     }
 }