X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticesection.php;h=ba30c982e4988926154c35d644891d4330c03d09;hb=e8d1bb25469fe1ef0cbcb32c3022010997aca4b0;hp=2c52d66a5913c3b2cfe23b9b6d7eeae9e8e3c7a2;hpb=a3b9367c9aea253d560db7d9b16d625cd0953a62;p=quix0rs-gnu-social.git diff --git a/lib/noticesection.php b/lib/noticesection.php index 2c52d66a59..ba30c982e4 100644 --- a/lib/noticesection.php +++ b/lib/noticesection.php @@ -46,14 +46,26 @@ define('NOTICES_PER_SECTION', 6); * @link http://status.net/ */ -class NoticeSection extends Section +abstract class NoticeSection extends Section { + protected $addressees = false; + protected $attachments = false; + protected $maxchars = 140; + protected $options = false; + protected $show_n = NOTICES_PER_SECTION; + function showContent() { - // args: notice object, html outputter, preference array for list and items - $list = new SectionNoticeList($this->getNotices(), $this->out); + $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()