]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/peopletagsbyuser.php
Added type-hints for StartInitializeRouter hooks.
[quix0rs-gnu-social.git] / actions / peopletagsbyuser.php
index 8b3a91917a5f0611b7fbebbc8b847edba393e67f..7a78a9fe8ff1ee5d3958b285d0a63189fdd5eb83 100644 (file)
@@ -39,7 +39,7 @@ class PeopletagsbyuserAction extends Action
     var $tagger = null;
     var $tags = null;
 
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
@@ -68,7 +68,7 @@ class PeopletagsbyuserAction extends Action
         }
     }
 
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
 
@@ -116,7 +116,7 @@ class PeopletagsbyuserAction extends Action
 
         $user = common_current_user();
         if ($this->arg('public')) {
-            $this->tags = $this->tagger->getLists(false, $offset, $limit);
+            $this->tags = $this->tagger->getLists(null, $offset, $limit);
         } else if ($this->arg('private')) {
             if (empty($user)) {
                 // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
@@ -130,20 +130,20 @@ class PeopletagsbyuserAction extends Action
                 $this->clientError(_('You cannot view others\' private lists'), 403);
             }
         } else {
-            $this->tags = $this->tagger->getLists(common_current_user(), $offset, $limit);
+            $this->tags = $this->tagger->getLists($this->scoped, $offset, $limit);
         }
         return true;
     }
 
-    function handle($args)
+    function handle(array $args=array())
     {
         parent::handle($args);
 
-               # Post from the tag dropdown; redirect to a GET
+        // Post from the tag dropdown; redirect to a GET
 
-               if ($_SERVER['REQUEST_METHOD'] == 'POST') {
-                   common_redirect(common_local_url('peopletagsbyuser', $this->getSelfUrlArgs()), 303);
-               }
+        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+            common_redirect(common_local_url('peopletagsbyuser', $this->getSelfUrlArgs()), 303);
+        }
 
         $this->showPage();
     }