aboutsummaryrefslogtreecommitdiffstats
path: root/ws.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2009-12-09 22:14:01 +0000
committerplegall <plg@piwigo.org>2009-12-09 22:14:01 +0000
commit6ddcd4fc87ad1dd12f7f824ae79958b0422b0f21 (patch)
tree282887f3eaaa7a9af553c3fce66c132a251428df /ws.php
parenta649fb4029ff8f79133fff147efd34369e08abfd (diff)
feature 1316 added: we now have the ability to only fill the single value
properties that are currently empty in the database instead of automatically replacing. feature 1312: as a matter of consistency, I have changed the replace_mode (that was only for multiple values properties) into multiple_value_mode + single_value_mode. git-svn-id: http://piwigo.org/svn/branches/2.0@4459 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'ws.php')
-rw-r--r--ws.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/ws.php b/ws.php
index 003ead80e..f4d1ce029 100644
--- a/ws.php
+++ b/ws.php
@@ -289,10 +289,13 @@ function ws_addDefaultMethods( $arr )
'default' => 0,
'maxValue' => $conf['available_permission_levels']
),
- 'replace_mode' => array('default' => false),
+ 'single_value_mode' => array('default' => 'fill_if_empty'),
+ 'multiple_value_mode' => array('default' => 'append'),
),
'POST method only. Admin only
-<br/><b>categories</b> is a string list "category_id[,rank];category_id[,rank]" The rank is optional and is equivalent to "auto" if not given.'
+<br/><b>categories</b> is a string list "category_id[,rank];category_id[,rank]" The rank is optional and is equivalent to "auto" if not given.
+<br/><b>single_value_mode</b> can be "fill_if_empty" (only use the input value if the corresponding values is currently empty) or "replace" (overwrite any existing value) and applies to single values properties like name/author/date_creation/comment
+<br/><b>multiple_value_mode</b> can be "append" (no change on existing values, add the new values) or "replace" and applies to multiple values properties like tag_ids/categories'
);
$service->addMethod(