]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/all.php
Fix some ProfileAction stuff, add function profileActionPreparation
[quix0rs-gnu-social.git] / actions / all.php
index fb0b63577afbb17377f4cb4ebd4dc0a163ec4551..9cab91264f00bd2337127dbaba6cdb27f3116db3 100644 (file)
@@ -41,13 +41,9 @@ class AllAction extends ProfileAction
 {
     var $notice;
 
-    protected function prepare(array $args=array())
+    protected function profileActionPreparation()
     {
-        parent::prepare($args);
-
-        $user = common_current_user();
-
-        if (!empty($user) && $user->streamModeOnly()) {
+        if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) {
             $stream = new InboxNoticeStream($this->target, $this->scoped);
         } else {
             $stream = new ThreadingInboxNoticeStream($this->target, $this->scoped);
@@ -60,8 +56,6 @@ class AllAction extends ProfileAction
             // TRANS: Client error when page not found (404).
             $this->clientError(_('No such page.'), 404);
         }
-
-        return true;
     }
 
     function title()