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