]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / actions / public.php
index 4f91b77e1ec44334f81383ad065da0314d38546b..b45bbeae7f78d4284dea3bf9c323231441c577f7 100644 (file)
@@ -56,11 +56,18 @@ class PublicAction extends ManagedAction
 
     protected $stream = null;
 
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
 
+    /**
+     * Read and validate arguments
+     *
+     * @param array $args URL parameters
+     *
+     * @return boolean success value
+     */
     protected function doPreparation()
     {
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
@@ -84,13 +91,22 @@ class PublicAction extends ManagedAction
         }
 
         if ($this->page > 1 && $this->notice->N == 0){
-            // TRANS: Server error when page not found (404).
-            $this->serverError(_('No such page.'),$code=404);
+            // TRANS: Client error when page not found (404).
+            $this->clientError(_('No such page.'), 404);
         }
 
         return true;
     }
 
+    /**
+     * handle request
+     *
+     * Show the public stream, using recipe method showPage()
+     *
+     * @param array $args arguments, mostly unused
+     *
+     * @return void
+     */
     protected function streamPrepare()
     {
         if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) {