aboutsummaryrefslogtreecommitdiffstats
path: root/ws.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-12-23 20:51:33 +0000
committerplegall <plg@piwigo.org>2010-12-23 20:51:33 +0000
commit130c83652ecb198347fb79a30df1596308f18d52 (patch)
tree0becdef1e5cfb7a1bbbd9938ad36f0b34f342f1b /ws.php
parent877a4e6e2e547c1b3434ef4efc8c52a6eb0a43ee (diff)
feature 2080 added: add methods pwg.images.delete and pwg.categories.delete from
pwg.images.addSimple plugin. pwg.categories.delete implements the new photo_deletion_mode (see feature:2081) and set it to "delete_orphans" by default. git-svn-id: http://piwigo.org/svn/trunk@8266 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--ws.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/ws.php b/ws.php
index 33006d413..808000108 100644
--- a/ws.php
+++ b/ws.php
@@ -236,7 +236,17 @@ function ws_addDefaultMethods( $arr )
),
'POST method only.<br>Use the <b>image</b> field for uploading file.<br>Set the form encoding to "form-data"<br><b>category</b> is the numeric identifier of the destination category.'
);
-
+
+ $service->addMethod(
+ 'pwg.images.delete',
+ 'ws_images_delete',
+ array(
+ 'image_id'=>array('default'=>0),
+ 'pwg_token' => array('default' => null),
+ ),
+ 'Delete photos. You can give several image_ids, comma separated'
+ );
+
$service->addMethod(
'pwg.categories.getAdminList',
'ws_categories_getAdminList',
@@ -255,6 +265,18 @@ function ws_addDefaultMethods( $arr )
);
$service->addMethod(
+ 'pwg.categories.delete',
+ 'ws_categories_delete',
+ array(
+ 'category_id'=>array('default'=>0),
+ 'pwg_token' => array('default' => null),
+ 'photo_deletion_mode' => array('default' => 'delete_orphans'),
+ ),
+ 'Delete categories. You can give several category_ids, comma separated.
+<br><b>photo_deletion_mode</b> can be "no_delete" (may create orphan photos), "delete_orphans" (default mode, only deletes photos linked to no other album) or "force_delete" (delete all photos, even those linked to other albums)'
+ );
+
+ $service->addMethod(
'pwg.tags.getAdminList',
'ws_tags_getAdminList',
array(),