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;
);
}
- function showLocalNav()
- {
- $nav = new PersonalGroupNav($this);
- $nav->show();
- }
-
function showEmptyListMessage()
{
// TRANS: Empty list message. %s is a user nickname.