From 11822535e711d7ed869635faf8cb7fee4795d0be Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Tue, 26 Apr 2011 17:29:57 +0000 Subject: [PATCH] Without this array_values(), user groups will be exported to JSON as object instead of array --- includes/api/ApiUserrights.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 2.20.1