]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelist.php
If there's no Happening, we can't use the RSVP.
[quix0rs-gnu-social.git] / lib / noticelist.php
index 6a430d210bbc9e53b63f56c5ebebc273e04a9cde..727be89bc6d0da56effbe0c05bd9e176d323639d 100644 (file)
@@ -55,6 +55,7 @@ class NoticeList extends Widget
 
     protected $addressees = true;
     protected $attachments = true;
+    protected $id_prefix = null;
     protected $maxchars = 0;
     protected $options = true;
     protected $show_n = NOTICES_PER_PAGE;
@@ -81,7 +82,12 @@ class NoticeList extends Widget
                 $this->$key = (bool)$prefs[$key];
             }
         }
-
+        // string preferences
+        foreach(array('id_prefix') as $key) {
+            if (array_key_exists($key, $prefs)) {
+                $this->$key = $prefs[$key];
+            }
+        }
     }
 
     /**
@@ -134,6 +140,7 @@ class NoticeList extends Widget
     {
         $prefs = array('addressees' => $this->addressees,
                        'attachments' => $this->attachments,
+                       'id_prefix' => $this->id_prefix,
                        'maxchars' => $this->maxchars,
                        'options' => $this->options);
         return new NoticeListItem($notice, $this->out, $prefs);
@@ -148,15 +155,9 @@ class NoticeList extends Widget
 
             // Prefill attachments
             Notice::fillAttachments($notices);
-            // Prefill repeat data
-            Notice::fillRepeats($notices);
             // Prefill the profiles
             $profiles = Notice::fillProfiles($notices);
 
-            if ($scoped instanceof Profile) {
-                Notice::pivotGet('repeat_of', $notice_ids, array('profile_id' => $scoped->id));
-            }
-
             Event::handle('EndNoticeListPrefill', array(&$notices, &$profiles, $notice_ids, $scoped));
         }
     }