]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/groupqueue.php
Merge branch 'master' of gitorious.org:social/mainline
[quix0rs-gnu-social.git] / actions / groupqueue.php
index 1d5a3cd1341c470c5549c021346561f685521584..060b5a2e7d10753a61feca6f0bb4c2cb6e2896c4 100644 (file)
@@ -47,13 +47,13 @@ class GroupqueueAction extends GroupAction
 {
     var $page = null;
 
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
 
     // @todo FIXME: most of this belongs in a base class, sounds common to most group actions?
-    function prepare($args)
+    protected function prepare(array $args=array())
     {
         parent::prepare($args);
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
@@ -69,13 +69,11 @@ class GroupqueueAction extends GroupAction
                 $args['page'] = $this->page;
             }
             common_redirect(common_local_url('groupqueue', $args), 301);
-            return false;
         }
 
         if (!$nickname) {
             // TRANS: Client error displayed when trying to view group members without providing a group nickname.
             $this->clientError(_('No nickname.'), 404);
-            return false;
         }
 
         $local = Local_group::getKV('nickname', $nickname);
@@ -83,7 +81,6 @@ class GroupqueueAction extends GroupAction
         if (!$local) {
             // TRANS: Client error displayed when trying to view group members for a non-existing group.
             $this->clientError(_('No such group.'), 404);
-            return false;
         }
 
         $this->group = User_group::getKV('id', $local->group_id);
@@ -91,14 +88,12 @@ class GroupqueueAction extends GroupAction
         if (!$this->group) {
             // TRANS: Client error displayed when trying to view group members for an object that is not a group.
             $this->clientError(_('No such group.'), 404);
-            return false;
         }
 
         $cur = common_current_user();
         if (!$cur || !$cur->isAdmin($this->group)) {
             // TRANS: Client error displayed when trying to approve group applicants without being a group administrator.
             $this->clientError(_('Only the group admin may approve users.'));
-            return false;
         }
         return true;
     }
@@ -119,9 +114,9 @@ class GroupqueueAction extends GroupAction
         }
     }
 
-    function handle($args)
+    protected function handle()
     {
-        parent::handle($args);
+        parent::handle();
         $this->showPage();
     }
 
@@ -158,7 +153,7 @@ class GroupqueueAction extends GroupAction
 // @todo FIXME: documentation missing.
 class GroupQueueList extends GroupMemberList
 {
-    function newListItem($profile)
+    function newListItem(Profile $profile)
     {
         return new GroupQueueListItem($profile, $this->group, $this->action);
     }