X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgroupqueue.php;h=060b5a2e7d10753a61feca6f0bb4c2cb6e2896c4;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=4bbf5dcb023ea249dfbfbdd3edacaff192bcd241;hpb=7d64d8c78cfa102b91975598ef9e574d2ef14b8c;p=quix0rs-gnu-social.git diff --git a/actions/groupqueue.php b/actions/groupqueue.php index 4bbf5dcb02..060b5a2e7d 100644 --- a/actions/groupqueue.php +++ b/actions/groupqueue.php @@ -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,36 +69,31 @@ 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::staticGet('nickname', $nickname); + $local = Local_group::getKV('nickname', $nickname); 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::staticGet('id', $local->group_id); + $this->group = User_group::getKV('id', $local->group_id); 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); }