X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fall.php;h=5fd2475e4911f3b467a8836cfba87b92a63cdc36;hb=2ea66bd0c1f456906e26fefa01f90ee53078f2c2;hp=dc08592faf15f98096172dadddee6700fae9cc3e;hpb=c4b8f68a1a3ed6422a2ed1cb7a8b5b5c65011b5f;p=quix0rs-gnu-social.git diff --git a/actions/all.php b/actions/all.php index dc08592faf..5fd2475e49 100644 --- a/actions/all.php +++ b/actions/all.php @@ -55,17 +55,17 @@ class AllAction extends ProfileAction function prepare($args) { parent::prepare($args); - $cur = common_current_user(); - if (!empty($cur) && $cur->id == $this->user->id) { - $this->notice = $this->user->noticeInbox(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); - } else { - $this->notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); - } + $stream = new InboxNoticeStream($this->user); + + $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1, + null, + null); if ($this->page > 1 && $this->notice->N == 0) { // TRANS: Server error when page not found (404). - $this->serverError(_('No such page.'), $code = 404); + $this->serverError(_('No such page.'), 404); } return true; @@ -127,12 +127,6 @@ class AllAction extends ProfileAction ); } - function showLocalNav() - { - $nav = new PersonalGroupNav($this); - $nav->show(); - } - function showEmptyListMessage() { // TRANS: Empty list message. %s is a user nickname. @@ -163,7 +157,16 @@ class AllAction extends ProfileAction function showContent() { if (Event::handle('StartShowAllContent', array($this))) { - $nl = new NoticeList($this->notice, $this); + + $profile = null; + + $current_user = common_current_user(); + + if (!empty($current_user)) { + $profile = $current_user->getProfile(); + } + + $nl = new ThreadedNoticeList($this->notice, $this, $profile); $cnt = $nl->show();