]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use InboxNoticeStream in AllmapAction in Mapstraction
authorEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 19:41:34 +0000 (15:41 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 19:41:34 +0000 (15:41 -0400)
plugins/Mapstraction/allmap.php

index 62d8d044582b627ce3b7c0f0c5b80a8c215da1c7..d1a9fddabb467b269cf647eed081c80ebd65fb7e 100644 (file)
@@ -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;
         }
     }