3 if (!defined('GNUSOCIAL')) { exit(1); }
5 abstract class NoticestreamAction extends ProfileAction
7 protected $notice = null; // holds the stream result
9 protected function prepare(array $args=array()) {
10 parent::prepare($args);
12 // fetch the actual stream stuff
13 $stream = $this->getStream();
14 $this->notice = $stream->getNotices(($this->page-1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
16 if ($this->page > 1 && $this->notice->N == 0) {
17 // TRANS: Client error when page not found (404).
18 $this->clientError(_('No such page.'), 404);
24 // this fetches the NoticeStream
25 abstract public function getStream();