X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigroupismember.php;h=c9a363582b75b4f8bda6bb6f555c585dd8f155dc;hb=24e05350011eb1b4aa05c7cfa2b9e901bd7f9c2f;hp=97f8435614e9da39662c67155f0fd1fba1daf3d6;hpb=77aed28f17dbc3607502f1f47984661867d18f4f;p=quix0rs-gnu-social.git diff --git a/actions/apigroupismember.php b/actions/apigroupismember.php index 97f8435614..c9a363582b 100644 --- a/actions/apigroupismember.php +++ b/actions/apigroupismember.php @@ -26,6 +26,7 @@ * @author Jeffery To * @author Zach Copley * @copyright 2009 StatusNet, Inc. + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -34,8 +35,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apibareauth.php'; - /** * Returns whether a user is a member of a specified group. * @@ -48,7 +47,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiGroupIsMemberAction extends ApiBareAuthAction { var $group = null; @@ -59,7 +57,6 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ function prepare($args) @@ -81,18 +78,19 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction * * @return void */ - function handle($args) { parent::handle($args); if (empty($this->user)) { + // TRANS: Client error displayed when checking group membership for a non-existing user. $this->clientError(_('No such user.'), 404, $this->format); return; } if (empty($this->group)) { - $this->clientError(_('Group not found!'), 404, $this->format); + // TRANS: Client error displayed when checking group membership for a non-existing group. + $this->clientError(_('Group not found.'), 404, $this->format); return false; } @@ -111,6 +109,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 400, $this->format @@ -128,10 +127,8 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction * * @return boolean is read only action? */ - function isReadOnly($args) { return true; } - }