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
This commit is contained in:
plegall
2010-12-23 20:51:33 +00:00
parent 877a4e6e2e
commit 130c83652e
2 changed files with 130 additions and 1 deletions
+23 -1
View File
@@ -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',
@@ -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.
<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',