X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fall.php;h=fb0b63577afbb17377f4cb4ebd4dc0a163ec4551;hb=f094918cf69fec48aa501b8ec0cfa4af87d11266;hp=f794064f877d14d9b2f73b1eabe7bbe3cc500edc;hpb=c0f65f6ea76ffa035cbf2c4126bedaae9d8752c8;p=quix0rs-gnu-social.git diff --git a/actions/all.php b/actions/all.php index f794064f87..fb0b63577a 100644 --- a/actions/all.php +++ b/actions/all.php @@ -41,11 +41,6 @@ class AllAction extends ProfileAction { var $notice; - function isReadOnly($args) - { - return true; - } - protected function prepare(array $args=array()) { parent::prepare($args); @@ -62,25 +57,13 @@ class AllAction extends ProfileAction NOTICES_PER_PAGE + 1); if ($this->page > 1 && $this->notice->N == 0) { - // TRANS: Server error when page not found (404). - $this->serverError(_('No such page.'), 404); + // TRANS: Client error when page not found (404). + $this->clientError(_('No such page.'), 404); } return true; } - protected function handle() - { - parent::handle(); - - if (!$this->target instanceof Profile) { - // TRANS: Client error when user not found for an action. - $this->clientError(_('No such user.')); - } - - $this->showPage(); - } - function title() { if (!empty($this->scoped) && $this->scoped->id == $this->target->id) { @@ -173,7 +156,7 @@ class AllAction extends ProfileAction } if (!empty($current_user) && $current_user->streamModeOnly()) { - $nl = new NoticeList($this->notice, $this); + $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE)); } else { $nl = new ThreadedNoticeList($this->notice, $this, $profile); } @@ -213,8 +196,6 @@ class AllAction extends ProfileAction // XXX: make this a little more convenient if (!common_config('performance', 'high')) { - $pop = new PopularNoticeSection($this, Profile::current()); - $pop->show(); $pop = new InboxTagCloudSection($this, $this->target); $pop->show(); } @@ -223,8 +204,8 @@ class AllAction extends ProfileAction class ThreadingInboxNoticeStream extends ThreadingNoticeStream { - function __construct($user, $profile) + function __construct(Profile $target, Profile $scoped=null) { - parent::__construct(new InboxNoticeStream($user, $profile)); + parent::__construct(new InboxNoticeStream($target, $scoped)); } }