From: Evan Prodromou Date: Thu, 7 Apr 2011 19:41:34 +0000 (-0400) Subject: use InboxNoticeStream in AllmapAction in Mapstraction X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=45ba33e2ac09e61266e454cdf04e15f402dc180c;p=quix0rs-gnu-social.git use InboxNoticeStream in AllmapAction in Mapstraction --- diff --git a/plugins/Mapstraction/allmap.php b/plugins/Mapstraction/allmap.php index 62d8d04458..d1a9fddabb 100644 --- a/plugins/Mapstraction/allmap.php +++ b/plugins/Mapstraction/allmap.php @@ -46,15 +46,15 @@ class AllmapAction extends MapAction { function prepare($args) { - if(parent::prepare($args)) { + if (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, $cur->getProfile()); + $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1, + null, + null); return true; - }else{ + } else { return false; } }