]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
threadednoticelist takes a profile param
[quix0rs-gnu-social.git] / actions / public.php
index d2b0373dc69382aad8951b88cc9f664117e90164..84306e1fccf23418da9ad97d450821b659d0471f 100644 (file)
@@ -85,8 +85,18 @@ class PublicAction extends Action
 
         common_set_returnto($this->selfUrl());
 
-        $this->notice = Notice::publicStream(($this->page-1)*NOTICES_PER_PAGE,
-                                       NOTICES_PER_PAGE + 1);
+        $profile = null;
+        
+        $user = common_current_user();
+
+        if (!empty($user)) {
+            $profile = $user->getProfile();
+        }
+
+        $stream = new PublicNoticeStream($profile);
+
+        $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
+                                            NOTICES_PER_PAGE + 1);
 
         if (!$this->notice) {
             // TRANS: Server error displayed when a public timeline cannot be retrieved.