X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigroupmembership.php;h=86ae091162fe1781b0a134391b12fef229469455;hb=3326b7b850f538f0e3c2c7969c5e566e2a374ffb;hp=7ad8fb767ec5731c24a3ed8a1b0b9a3f37d518a9;hpb=87d46e1ae5e5effcc985021ff5af3f10815f3d3c;p=quix0rs-gnu-social.git diff --git a/actions/apigroupmembership.php b/actions/apigroupmembership.php index 7ad8fb767e..86ae091162 100644 --- a/actions/apigroupmembership.php +++ b/actions/apigroupmembership.php @@ -35,8 +35,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiprivateauth.php'; - /** * List 20 newest members of the group specified by name or ID. * @@ -61,15 +59,14 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction * * @return boolean success flag */ - function prepare($args) + protected function prepare(array $args=array()) { parent::prepare($args); $this->group = $this->getTargetGroup($this->arg('id')); if (empty($this->group)) { // TRANS: Client error displayed trying to show group membership on a non-existing group. - $this->clientError(_('Group not found.'), 404, $this->format); - return false; + $this->clientError(_('Group not found.'), 404); } $this->profiles = $this->getProfiles(); @@ -82,13 +79,11 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction * * Show the members of the group * - * @param array $args $_REQUEST data (unused) - * * @return void */ - function handle($args) + protected function handle() { - parent::handle($args); + parent::handle(); // XXX: RSS and Atom @@ -100,13 +95,8 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction $this->showJsonUsers($this->profiles); break; default: - $this->clientError( - // TRANS: Client error displayed when coming across a non-supported API method. - _('API method not found.'), - 404, - $this->format - ); - break; + // TRANS: Client error displayed when coming across a non-supported API method. + $this->clientError(_('API method not found.'), 404); } } @@ -140,7 +130,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction * * @return boolean true */ - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; }