Changeset 8266 for trunk/ws.php


Ignore:
Timestamp:
Dec 23, 2010, 9:51:33 PM (13 years ago)
Author:
plg
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ws.php

    r8249 r8266  
    237237    '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.'
    238238    );
    239  
     239
     240  $service->addMethod(
     241    'pwg.images.delete',
     242    'ws_images_delete',
     243    array(
     244      'image_id'=>array('default'=>0),
     245      'pwg_token' => array('default' => null),
     246      ),
     247    'Delete photos. You can give several image_ids, comma separated'
     248    );
     249
    240250  $service->addMethod(
    241251    'pwg.categories.getAdminList',
     
    253263      ),
    254264    'administration method only'
     265    );
     266
     267  $service->addMethod(
     268    'pwg.categories.delete',
     269    'ws_categories_delete',
     270    array(
     271      'category_id'=>array('default'=>0),
     272      'pwg_token' => array('default' => null),
     273      'photo_deletion_mode' => array('default' => 'delete_orphans'),
     274      ),
     275    'Delete categories. You can give several category_ids, comma separated.
     276<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)'
    255277    );
    256278
Note: See TracChangeset for help on using the changeset viewer.