X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigroupmembership.php;h=c97b27fac425cd7e7f383e359d7738cec37a430d;hb=fee6b78e2896705b831fc98025581405e3e21e27;hp=b31e47b3989b46d673e8caecc45a95ae407c58ff;hpb=b4b992bca77d34b8643910e8d590b5be7fede94b;p=quix0rs-gnu-social.git diff --git a/actions/apigroupmembership.php b/actions/apigroupmembership.php index b31e47b398..c97b27fac4 100644 --- a/actions/apigroupmembership.php +++ b/actions/apigroupmembership.php @@ -34,7 +34,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; +require_once INSTALLDIR . '/lib/apiprivateauth.php'; /** * List 20 newest members of the group specified by name or ID. @@ -49,7 +49,7 @@ require_once INSTALLDIR . '/lib/api.php'; * @link http://status.net/ */ -class ApiGroupMembershipAction extends ApiAction +class ApiGroupMembershipAction extends ApiPrivateAuthAction { var $group = null; var $profiles = null; @@ -87,6 +87,11 @@ class ApiGroupMembershipAction extends ApiAction { parent::handle($args); + if (empty($this->group)) { + $this->clientError(_('Group not found.'), 404, $this->format); + return false; + } + // XXX: RSS and Atom switch($this->format) { @@ -98,7 +103,7 @@ class ApiGroupMembershipAction extends ApiAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); @@ -120,8 +125,7 @@ class ApiGroupMembershipAction extends ApiAction ($this->page - 1) * $this->count, $this->count, $this->since_id, - $this->max_id, - $this->since + $this->max_id ); while ($profile->fetch()) {