Changeset 20817 for trunk/ws.php


Ignore:
Timestamp:
Feb 18, 2013, 9:02:55 PM (11 years ago)
Author:
mistic100
Message:

completely rewrite the indentation of ws.php, no technical changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ws.php

    r20815 r20817  
    104104  include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php');
    105105 
    106   $service->addMethod('pwg.getVersion', 'ws_getVersion',
     106  $service->addMethod(
     107      'pwg.getVersion',
     108      'ws_getVersion',
    107109      null,
    108110      'retrieves the PWG version'
    109111    );
    110112         
    111   $service->addMethod('pwg.getInfos', 'ws_getInfos',
     113  $service->addMethod(
     114      'pwg.getInfos',
     115      'ws_getInfos',
    112116      null,
    113117      'retrieves general informations'
    114118    );
    115119
    116   $service->addMethod('pwg.caddie.add', 'ws_caddie_add',
     120  $service->addMethod(
     121      'pwg.caddie.add',
     122      'ws_caddie_add',
    117123      array(
    118124        'image_id'=> array('flags'=>WS_PARAM_FORCE_ARRAY),
     
    121127    );
    122128
    123   $service->addMethod('pwg.categories.getImages', 'ws_categories_getImages',
     129  $service->addMethod(
     130      'pwg.categories.getImages',
     131      'ws_categories_getImages',
    124132      array(
    125133        'cat_id' =>     array('default'=>0,
     
    147155    );
    148156
    149   $service->addMethod('pwg.categories.getList', 'ws_categories_getList',
     157  $service->addMethod(
     158      'pwg.categories.getList',
     159      'ws_categories_getList',
    150160      array(
    151161        'cat_id' =>       array('default'=>0),
     
    158168    );
    159169
    160   $service->addMethod('pwg.getMissingDerivatives', 'ws_getMissingDerivatives',
     170  $service->addMethod(
     171      'pwg.getMissingDerivatives',
     172      'ws_getMissingDerivatives',
    161173      array(
    162174        'types' =>      array('default'=>array(),
     
    181193    );
    182194
    183   $service->addMethod('pwg.images.addComment', 'ws_images_addComment',
     195  $service->addMethod(
     196      'pwg.images.addComment',
     197      'ws_images_addComment',
    184198      array(
    185199        'image_id' => array(),
     
    191205    );
    192206
    193   $service->addMethod('pwg.images.getInfo', 'ws_images_getInfo',
     207  $service->addMethod(
     208      'pwg.images.getInfo',
     209      'ws_images_getInfo',
    194210      array(
    195211        'image_id' =>           array(),
     
    201217    );
    202218
    203   $service->addMethod('pwg.images.rate', 'ws_images_rate',
     219  $service->addMethod(
     220      'pwg.images.rate',
     221      'ws_images_rate',
    204222      array('image_id', 'rate'),
    205223      'rate the image'
    206224    );
    207225
    208   $service->addMethod('pwg.images.search', 'ws_images_search',
     226  $service->addMethod(
     227      'pwg.images.search',
     228      'ws_images_search',
    209229      array(
    210230        'query' =>      array(),
     
    228248    );
    229249
    230   $service->addMethod('pwg.images.setPrivacyLevel', 'ws_images_setPrivacyLevel',
     250  $service->addMethod(
     251      'pwg.images.setPrivacyLevel',
     252      'ws_images_setPrivacyLevel',
    231253      array(
    232254        'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY),
     
    236258    );
    237259
    238   $service->addMethod('pwg.images.setRank', 'ws_images_setRank',
     260  $service->addMethod(
     261      'pwg.images.setRank',
     262      'ws_images_setRank',
    239263      array('image_id', 'category_id', 'rank'),
    240264      'sets the rank of a photo for a given album (POST method only, for admins)'
    241265    );
    242266
    243   $service->addMethod('pwg.rates.delete', 'ws_rates_delete',
     267  $service->addMethod(
     268      'pwg.rates.delete',
     269      'ws_rates_delete',
    244270      array(
    245271        'user_id' =>      array(),
     
    249275    );
    250276
    251   $service->addMethod('pwg.session.getStatus', 'ws_session_getStatus', null, '');
    252 
    253   $service->addMethod('pwg.session.login', 'ws_session_login',
     277  $service->addMethod(
     278      'pwg.session.getStatus',
     279      'ws_session_getStatus',
     280      null,
     281      null
     282    );
     283
     284  $service->addMethod(
     285      'pwg.session.login',
     286      'ws_session_login',
    254287      array('username', 'password'),
    255288      'POST method only'
    256289    );
    257290
    258   $service->addMethod('pwg.session.logout', 'ws_session_logout', null, '');
    259 
    260   $service->addMethod('pwg.tags.getList', 'ws_tags_getList',
     291  $service->addMethod(
     292      'pwg.session.logout',
     293      'ws_session_logout',
     294      null,
     295      null
     296    );
     297
     298  $service->addMethod(
     299      'pwg.tags.getList',
     300      'ws_tags_getList',
    261301      array(
    262302        'sort_by_counter' => array('default' =>false),
     
    265305    );
    266306
    267   $service->addMethod('pwg.tags.getImages', 'ws_tags_getImages',
     307  $service->addMethod(
     308      'pwg.tags.getImages',
     309      'ws_tags_getImages',
    268310      array(
    269311        'tag_id' =>       array('default'=>null,
     
    293335    );
    294336
    295   $service->addMethod('pwg.images.addChunk', 'ws_images_add_chunk',
     337  $service->addMethod(
     338      'pwg.images.addChunk',
     339      'ws_images_add_chunk',
    296340      array('data', 'original_sum', 'type', 'position'),
    297341      'POST method only. For admin only.'
    298342    );
    299343
    300   $service->addMethod('pwg.images.addFile', 'ws_images_addFile',
     344  $service->addMethod(
     345      'pwg.images.addFile',
     346      'ws_images_addFile',
    301347      array('image_id', 'type', 'sum'),
    302348      'Add or update a file for an existing photo. pwg.images.addChunk must have been called  before (maybe several times)'
     
    304350
    305351
    306   $service->addMethod('pwg.images.add', 'ws_images_add',
     352  $service->addMethod(
     353      'pwg.images.add',
     354      'ws_images_add',
    307355      array(
    308356        'file_sum' =>           array(),
     
    327375    );
    328376
    329   $service->addMethod('pwg.images.addSimple', 'ws_images_addSimple',
     377  $service->addMethod(
     378      'pwg.images.addSimple',
     379      'ws_images_addSimple',
    330380      array(
    331381        'category' => array('default'=>null),
     
    344394    );
    345395
    346   $service->addMethod('pwg.images.delete', 'ws_images_delete',
     396  $service->addMethod(
     397      'pwg.images.delete',
     398      'ws_images_delete',
    347399      array(
    348400        'image_id' =>   array('default'=>0),
     
    352404    );
    353405
    354   $service->addMethod('pwg.categories.getAdminList', 'ws_categories_getAdminList',
     406  $service->addMethod(
     407      'pwg.categories.getAdminList',
     408      'ws_categories_getAdminList',
    355409      null,
    356410      'administration method only'
    357411    );
    358412
    359   $service->addMethod('pwg.categories.add', 'ws_categories_add',
     413  $service->addMethod(
     414      'pwg.categories.add',
     415      'ws_categories_add',
    360416      array(
    361417        'name' =>         array(),
     
    369425    );
    370426
    371   $service->addMethod('pwg.categories.delete', 'ws_categories_delete',
     427  $service->addMethod(
     428      'pwg.categories.delete',
     429      'ws_categories_delete',
    372430      array(
    373431        'category_id'=>           array('default'=>0),
     
    380438    );
    381439
    382   $service->addMethod('pwg.categories.move', 'ws_categories_move',
     440  $service->addMethod(
     441      'pwg.categories.move',
     442      'ws_categories_move',
    383443      array(
    384444        'category_id' =>  array('default'=>0),
     
    389449    );
    390450
    391   $service->addMethod('pwg.categories.setRepresentative', 'ws_categories_setRepresentative',
     451  $service->addMethod(
     452      'pwg.categories.setRepresentative',
     453      'ws_categories_setRepresentative',
    392454      array(
    393455        'category_id' =>  array('default'=>0),
     
    397459    );
    398460
    399   $service->addMethod('pwg.tags.getAdminList', 'ws_tags_getAdminList',
     461  $service->addMethod(
     462      'pwg.tags.getAdminList',
     463      'ws_tags_getAdminList',
    400464      null,
    401465      'administration method only'
    402466    );
    403467
    404   $service->addMethod('pwg.tags.add', 'ws_tags_add',
     468  $service->addMethod(
     469      'pwg.tags.add',
     470      'ws_tags_add',
    405471      array('name'),
    406472      'administration method only'
    407473    );
    408474
    409   $service->addMethod('pwg.images.exist', 'ws_images_exist',
     475  $service->addMethod(
     476      'pwg.images.exist',
     477      'ws_images_exist',
    410478      array(
    411479        'md5sum_list' =>    array('default'=>null),
     
    415483    );
    416484
    417   $service->addMethod('pwg.images.checkFiles', 'ws_images_checkFiles',
     485  $service->addMethod(
     486      'pwg.images.checkFiles',
     487      'ws_images_checkFiles',
    418488      array(
    419489        'image_id' =>       array(),
     
    425495    );
    426496
    427   $service->addMethod('pwg.images.checkUpload', 'ws_images_checkUpload',
     497  $service->addMethod(
     498      'pwg.images.checkUpload',
     499      'ws_images_checkUpload',
    428500      null,
    429501      'check if Piwigo is ready for upload'
    430502    );
    431503
    432   $service->addMethod('pwg.images.setInfo', 'ws_images_setInfo',
     504  $service->addMethod(
     505      'pwg.images.setInfo',
     506      'ws_images_setInfo',
    433507      array(
    434508        'image_id' =>       array(),
     
    452526    );
    453527
    454   $service->addMethod('pwg.categories.setInfo', 'ws_categories_setInfo',
     528  $service->addMethod(
     529      'pwg.categories.setInfo',
     530      'ws_categories_setInfo',
    455531      array(
    456532        'category_id' =>  array(),
     
    461537    );
    462538 
    463   $service->addMethod('pwg.plugins.getList', 'ws_plugins_getList',
     539  $service->addMethod(
     540      'pwg.plugins.getList',
     541      'ws_plugins_getList',
    464542      null,
    465543      'Admin only
     
    467545    );
    468546
    469   $service->addMethod('pwg.plugins.performAction', 'ws_plugins_performAction',
     547  $service->addMethod(
     548      'pwg.plugins.performAction',
     549      'ws_plugins_performAction',
    470550      array('action', 'plugin', 'pwg_token'),
    471551      'Admin only
     
    473553    );
    474554
    475   $service->addMethod('pwg.themes.performAction', 'ws_themes_performAction',
     555  $service->addMethod(
     556      'pwg.themes.performAction',
     557      'ws_themes_performAction',
    476558      array('action', 'theme', 'pwg_token'),
    477559      'activate/deactivate/delete/set_default a theme<br>administration status required'
    478560    );
    479561
    480   $service->addMethod('pwg.extensions.update', 'ws_extensions_update',
     562  $service->addMethod(
     563      'pwg.extensions.update',
     564      'ws_extensions_update',
    481565      array('type', 'id', 'revision', 'pwg_token'),
    482566      'Update an extension. Webmaster only.
     
    484568  );
    485569
    486   $service->addMethod('pwg.extensions.ignoreUpdate', 'ws_extensions_ignoreupdate',
     570  $service->addMethod(
     571      'pwg.extensions.ignoreUpdate',
     572      'ws_extensions_ignoreupdate',
    487573      array(
    488574        'type' =>       array('default'=>null),
     
    496582  );
    497583
    498   $service->addMethod('pwg.extensions.checkUpdates', 'ws_extensions_checkupdates',
     584  $service->addMethod(
     585      'pwg.extensions.checkUpdates',
     586      'ws_extensions_checkupdates',
    499587      null,
    500588      'Check if piwigo or extensions are up to date.'
Note: See TracChangeset for help on using the changeset viewer.