use InboxNoticeStream in AllmapAction in Mapstraction

This commit is contained in:
Evan Prodromou 2011-04-07 15:41:34 -04:00
parent 684d0a386d
commit 45ba33e2ac

View File

@ -46,15 +46,15 @@ class AllmapAction extends MapAction
{ {
function prepare($args) function prepare($args)
{ {
if(parent::prepare($args)) { if (parent::prepare($args)) {
$cur = common_current_user(); $cur = common_current_user();
if (!empty($cur) && $cur->id == $this->user->id) { $stream = new InboxNoticeStream($this->user, $cur->getProfile());
$this->notice = $this->user->noticeInbox(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
} else { NOTICES_PER_PAGE + 1,
$this->notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); null,
} null);
return true; return true;
}else{ } else {
return false; return false;
} }
} }