From 45ba33e2ac09e61266e454cdf04e15f402dc180c Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 7 Apr 2011 15:41:34 -0400 Subject: [PATCH] use InboxNoticeStream in AllmapAction in Mapstraction --- plugins/Mapstraction/allmap.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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; } }