From 130c83652ecb198347fb79a30df1596308f18d52 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 23 Dec 2010 20:51:33 +0000 Subject: 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 --- ws.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'ws.php') 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.
Use the image field for uploading file.
Set the form encoding to "form-data"
category 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', @@ -254,6 +264,18 @@ function ws_addDefaultMethods( $arr ) 'administration method only' ); + $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. +
photo_deletion_mode 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', -- cgit v1.2.3