X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigroupismember.php;h=8d31c65ddb8883d46bc66e8df4a2c823bbfcdd92;hb=27ef3b1d905cdf8f47b47293a757624dda88fdc7;hp=6cf3270129442a2d9c5cde8c6daaf35848416524;hpb=061af8fa06ccb98f667d1ee670da2dbb179d8b0e;p=quix0rs-gnu-social.git diff --git a/actions/apigroupismember.php b/actions/apigroupismember.php index 6cf3270129..8d31c65ddb 100644 --- a/actions/apigroupismember.php +++ b/actions/apigroupismember.php @@ -21,8 +21,12 @@ * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou + * @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/ */ @@ -38,14 +42,15 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To * @author Zach Copley * @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 $user = null; var $group = null; /** @@ -54,7 +59,6 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ function prepare($args) @@ -76,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; } @@ -106,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 ); @@ -114,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; + } }