diff --git a/include/ws_functions/pwg.categories.php b/include/ws_functions/pwg.categories.php index f98c2eb34..2763ad20b 100644 --- a/include/ws_functions/pwg.categories.php +++ b/include/ws_functions/pwg.categories.php @@ -576,7 +576,7 @@ function ws_categories_add($params, &$service) global $conf; - if ($params["position"] != "") + if (!empty($params['position']) and in_array($params['position'], array('first','last'))) { //TODO make persistent with user prefs $conf['newcat_default_position'] = $params["position"]; diff --git a/ws.php b/ws.php index b3d9d507e..6cb3428cf 100644 --- a/ws.php +++ b/ws.php @@ -611,7 +611,7 @@ function ws_addDefaultMethods( $arr ) 'info'=>'public, private'), 'commentable' => array('default'=>true, 'type'=>WS_TYPE_BOOL), - 'position' => array('default'=>null), + 'position' => array('default'=>null, 'info'=>'first, last'), ), 'Adds an album.', $ws_functions_root . 'pwg.categories.php',