]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticesection.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / noticesection.php
index 51c00d91bc36f4e459e7fbbb81bb012d80b02d2b..ba30c982e4988926154c35d644891d4330c03d09 100644 (file)
@@ -46,7 +46,7 @@ define('NOTICES_PER_SECTION', 6);
  * @link     http://status.net/
  */
 
-class NoticeSection extends Section
+abstract class NoticeSection extends Section
 {
     protected $addressees = false;
     protected $attachments = false;
@@ -56,15 +56,16 @@ class NoticeSection extends Section
 
     function showContent()
     {
-        // args: notice object, html outputter, preference array for list and items
-        $list = new NoticeList($this->getNotices(), $this->out,
-                                array('addressees' => $this->addressees,
-                                      'attachments' => $this->attachments,
-                                      'maxchars'=> $this->maxchars,
-                                      'options' => $this->options,
-                                      'show_n'  => $this->show_n));
+        $prefs = array();
+        foreach (array('addressees', 'attachments', 'maxchars', 'options', 'show_n') as $key) {
+            $prefs[$key] = $this->$key;
+        }
+        $prefs['id_prefix'] = $this->divId();
+
+        // args: notice object, html outputter, preference array for notice lists and their items
+        $list = new NoticeList($this->getNotices(), $this->out, $prefs);
         $total = $list->show(); // returns total amount of notices available
-        return ($total > NOTICES_PER_SECTION);  // do we have more to show?
+        return ($total > $this->show_n);  // do we have more to show?
     }
 
     function getNotices()