From: Max Semenik Date: Tue, 26 Apr 2011 17:29:57 +0000 (+0000) Subject: Without this array_values(), user groups will be exported to JSON as object instead... X-Git-Tag: 1.31.0-rc.0~30547 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=11822535e711d7ed869635faf8cb7fee4795d0be;p=lhc%2Fweb%2Fwiklou.git Without this array_values(), user groups will be exported to JSON as object instead of array --- diff --git a/includes/api/ApiUserrights.php b/includes/api/ApiUserrights.php index f0aeebf612..c6129dda54 100644 --- a/includes/api/ApiUserrights.php +++ b/includes/api/ApiUserrights.php @@ -96,11 +96,11 @@ class ApiUserrights extends ApiBase { ApiBase::PARAM_REQUIRED => true ), 'add' => array( - ApiBase::PARAM_TYPE => User::getAllGroups(), + ApiBase::PARAM_TYPE => array_values( User::getAllGroups() ), ApiBase::PARAM_ISMULTI => true ), 'remove' => array( - ApiBase::PARAM_TYPE => User::getAllGroups(), + ApiBase::PARAM_TYPE => array_values( User::getAllGroups() ), ApiBase::PARAM_ISMULTI => true ), 'token' => null,