diff options
Diffstat (limited to '')
-rw-r--r-- | ws.php | 31 |
1 files changed, 16 insertions, 15 deletions
@@ -707,10 +707,9 @@ function ws_addDefaultMethods( $arr ) 'pwg.groups.getList', 'ws_groups_getList', array( - 'group_id' => array('default'=>null, - 'flags'=>WS_PARAM_FORCE_ARRAY, + 'group_id' => array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY, 'type'=>WS_TYPE_ID), - 'name' => array('default'=>null, + 'name' => array('flags'=>WS_PARAM_OPTIONAL, 'info'=>'Use "%" as wildcard.'), 'per_page' => array('default'=>100, 'maxValue'=>$conf['ws_max_users_per_page'], @@ -755,8 +754,8 @@ function ws_addDefaultMethods( $arr ) 'ws_groups_setInfo', array( 'group_id' => array('type'=>WS_TYPE_ID), - 'name' => array('default'=>null), - 'is_default' => array('default'=>null, + 'name' => array('flags'=>WS_PARAM_OPTIONAL), + 'is_default' => array('flags'=>WS_PARAM_OPTIONAL, 'type'=>WS_TYPE_BOOL), ), '<b>Admin & POST only.</b> Updates a group. Leave a field blank to keep the current value.', @@ -794,19 +793,16 @@ function ws_addDefaultMethods( $arr ) 'pwg.users.getList', 'ws_users_getList', array( - 'user_id' => array('default'=>null, - 'flags'=>WS_PARAM_FORCE_ARRAY, + 'user_id' => array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY, 'type'=>WS_TYPE_ID), - 'username' => array('default'=>null, + 'username' => array('flags'=>WS_PARAM_OPTIONAL, 'info'=>'Use "%" as wildcard.'), - 'status' => array('default'=>null, - 'flags'=>WS_PARAM_FORCE_ARRAY, + 'status' => array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY, 'info'=>'guest,generic,normal,admin,webmaster'), 'min_level' => array('default'=>0, 'maxValue'=>max($conf['available_permission_levels']), 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), - 'group_id' => array('default'=>null, - 'flags'=>WS_PARAM_FORCE_ARRAY, + 'group_id' => array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY, 'type'=>WS_TYPE_ID), 'per_page' => array('default'=>100, 'maxValue'=>$conf['ws_max_users_per_page'], @@ -851,9 +847,14 @@ function ws_addDefaultMethods( $arr ) 'ws_users_setInfo', array( 'user_id' => array('type'=>WS_TYPE_ID), - 'username' => array('default'=>null), - 'password' => array('default'=>null), - 'email' => array('default'=>null), + 'username' => array('flags'=>WS_PARAM_OPTIONAL), + 'password' => array('flags'=>WS_PARAM_OPTIONAL), + 'email' => array('flags'=>WS_PARAM_OPTIONAL), + 'status' => array('flags'=>WS_PARAM_OPTIONAL, + 'info'=>'generic,normal,admin'), + 'level'=> array('flags'=>WS_PARAM_OPTIONAL, + 'maxValue'=>max($conf['available_permission_levels']), + 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), ), '<b>Admin & POST only.</b> Updates a user. Leave a field blank to keep the current value.', null, |