]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/all.php
.inc.php please ...
[quix0rs-gnu-social.git] / actions / all.php
index a0e0b9a08b71a59ff2c4e7a7ba19f6cd922361b3..9cab91264f00bd2337127dbaba6cdb27f3116db3 100644 (file)
@@ -41,18 +41,9 @@ class AllAction extends ProfileAction
 {
     var $notice;
 
-    function isReadOnly($args)
+    protected function profileActionPreparation()
     {
-        return true;
-    }
-
-    protected function prepare(array $args=array())
-    {
-        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);
@@ -62,23 +53,9 @@ class AllAction extends ProfileAction
                                             NOTICES_PER_PAGE + 1);
 
         if ($this->page > 1 && $this->notice->N == 0) {
-            // TRANS: Server error when page not found (404).
-            $this->serverError(_('No such page.'), 404);
+            // TRANS: Client error when page not found (404).
+            $this->clientError(_('No such page.'), 404);
         }
-
-        return true;
-    }
-
-    protected function handle()
-    {
-        parent::handle();
-
-        if (!$this->target instanceof Profile) {
-            // TRANS: Client error when user not found for an action.
-            $this->clientError(_('No such user.'));
-        }
-
-        $this->showPage();
     }
 
     function title()
@@ -173,7 +150,7 @@ class AllAction extends ProfileAction
             }
 
             if (!empty($current_user) && $current_user->streamModeOnly()) {
-                $nl = new NoticeList($this->notice, $this);
+                $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE));
             } else {
                 $nl = new ThreadedNoticeList($this->notice, $this, $profile);
             }
@@ -213,8 +190,6 @@ class AllAction extends ProfileAction
         // XXX: make this a little more convenient
 
         if (!common_config('performance', 'high')) {
-            $pop = new PopularNoticeSection($this, $this->scoped);
-            $pop->show();
             $pop = new InboxTagCloudSection($this, $this->target);
             $pop->show();
         }