X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigroupismember.php;h=8d31c65ddb8883d46bc66e8df4a2c823bbfcdd92;hb=0d30dff6d6daffcc93b1ca43bfc348d3f38572f2;hp=a8a40a6b3ba37a39dd61e8842f649bb5c5bf2b78;hpb=b4b992bca77d34b8643910e8d590b5be7fede94b;p=quix0rs-gnu-social.git diff --git a/actions/apigroupismember.php b/actions/apigroupismember.php index a8a40a6b3b..8d31c65ddb 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/ */ @@ -48,7 +49,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 +59,6 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ function prepare($args) @@ -81,18 +80,19 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction * * @return void */ - function handle($args) { parent::handle($args); if (empty($this->user)) { - $this->clientError(_('No such user!'), 404, $this->format); + // 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,7 +111,8 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction break; default: $this->clientError( - _('API method not found!'), + // TRANS: Client error displayed trying to execute an unknown API method showing group membership. + _('API method not found.'), 400, $this->format ); @@ -119,4 +120,17 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction } } + /** + * Return true if read only. + * + * MAY override + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + function isReadOnly($args) + { + return true; + } }