Index: /trunk/ws.php
===================================================================
--- /trunk/ws.php	(revision 20816)
+++ /trunk/ws.php	(revision 20817)
@@ -104,15 +104,21 @@
   include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php');
   
-  $service->addMethod('pwg.getVersion', 'ws_getVersion',
+  $service->addMethod(
+      'pwg.getVersion',
+      'ws_getVersion',
       null,
       'retrieves the PWG version'
     );
 	  
-  $service->addMethod('pwg.getInfos', 'ws_getInfos',
+  $service->addMethod(
+      'pwg.getInfos',
+      'ws_getInfos',
       null,
       'retrieves general informations'
     );
 
-  $service->addMethod('pwg.caddie.add', 'ws_caddie_add',
+  $service->addMethod(
+      'pwg.caddie.add',
+      'ws_caddie_add',
       array(
         'image_id'=> array('flags'=>WS_PARAM_FORCE_ARRAY),
@@ -121,5 +127,7 @@
     );
 
-  $service->addMethod('pwg.categories.getImages', 'ws_categories_getImages',
+  $service->addMethod(
+      'pwg.categories.getImages',
+      'ws_categories_getImages',
       array(
         'cat_id' =>     array('default'=>0, 
@@ -147,5 +155,7 @@
     );
 
-  $service->addMethod('pwg.categories.getList', 'ws_categories_getList',
+  $service->addMethod(
+      'pwg.categories.getList',
+      'ws_categories_getList',
       array(
         'cat_id' =>       array('default'=>0),
@@ -158,5 +168,7 @@
     );
 
-  $service->addMethod('pwg.getMissingDerivatives', 'ws_getMissingDerivatives',
+  $service->addMethod(
+      'pwg.getMissingDerivatives',
+      'ws_getMissingDerivatives',
       array(
         'types' =>      array('default'=>array(),
@@ -181,5 +193,7 @@
     );
 
-  $service->addMethod('pwg.images.addComment', 'ws_images_addComment',
+  $service->addMethod(
+      'pwg.images.addComment',
+      'ws_images_addComment',
       array(
         'image_id' => array(),
@@ -191,5 +205,7 @@
     );
 
-  $service->addMethod('pwg.images.getInfo', 'ws_images_getInfo',
+  $service->addMethod(
+      'pwg.images.getInfo',
+      'ws_images_getInfo',
       array(
         'image_id' =>           array(),
@@ -201,10 +217,14 @@
     );
 
-  $service->addMethod('pwg.images.rate', 'ws_images_rate',
+  $service->addMethod(
+      'pwg.images.rate',
+      'ws_images_rate',
       array('image_id', 'rate'),
       'rate the image'
     );
 
-  $service->addMethod('pwg.images.search', 'ws_images_search',
+  $service->addMethod(
+      'pwg.images.search',
+      'ws_images_search',
       array(
         'query' =>      array(),
@@ -228,5 +248,7 @@
     );
 
-  $service->addMethod('pwg.images.setPrivacyLevel', 'ws_images_setPrivacyLevel',
+  $service->addMethod(
+      'pwg.images.setPrivacyLevel',
+      'ws_images_setPrivacyLevel',
       array(
         'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY),
@@ -236,10 +258,14 @@
     );
 
-  $service->addMethod('pwg.images.setRank', 'ws_images_setRank',
+  $service->addMethod(
+      'pwg.images.setRank',
+      'ws_images_setRank',
       array('image_id', 'category_id', 'rank'),
       'sets the rank of a photo for a given album (POST method only, for admins)'
     );
 
-  $service->addMethod('pwg.rates.delete', 'ws_rates_delete',
+  $service->addMethod(
+      'pwg.rates.delete',
+      'ws_rates_delete',
       array(
         'user_id' =>      array(),
@@ -249,14 +275,28 @@
     );
 
-  $service->addMethod('pwg.session.getStatus', 'ws_session_getStatus', null, '');
-
-  $service->addMethod('pwg.session.login', 'ws_session_login',
+  $service->addMethod(
+      'pwg.session.getStatus',
+      'ws_session_getStatus',
+      null,
+      null
+    );
+
+  $service->addMethod(
+      'pwg.session.login',
+      'ws_session_login',
       array('username', 'password'),
       'POST method only'
     );
 
-  $service->addMethod('pwg.session.logout', 'ws_session_logout', null, '');
-
-  $service->addMethod('pwg.tags.getList', 'ws_tags_getList',
+  $service->addMethod(
+      'pwg.session.logout',
+      'ws_session_logout',
+      null,
+      null
+    );
+
+  $service->addMethod(
+      'pwg.tags.getList',
+      'ws_tags_getList',
       array(
         'sort_by_counter' => array('default' =>false),
@@ -265,5 +305,7 @@
     );
 
-  $service->addMethod('pwg.tags.getImages', 'ws_tags_getImages',
+  $service->addMethod(
+      'pwg.tags.getImages',
+      'ws_tags_getImages',
       array(
         'tag_id' =>       array('default'=>null,
@@ -293,10 +335,14 @@
     );
 
-  $service->addMethod('pwg.images.addChunk', 'ws_images_add_chunk',
+  $service->addMethod(
+      'pwg.images.addChunk',
+      'ws_images_add_chunk',
       array('data', 'original_sum', 'type', 'position'),
       'POST method only. For admin only.'
     );
 
-  $service->addMethod('pwg.images.addFile', 'ws_images_addFile',
+  $service->addMethod(
+      'pwg.images.addFile',
+      'ws_images_addFile',
       array('image_id', 'type', 'sum'),
       'Add or update a file for an existing photo. pwg.images.addChunk must have been called  before (maybe several times)'
@@ -304,5 +350,7 @@
 
 
-  $service->addMethod('pwg.images.add', 'ws_images_add',
+  $service->addMethod(
+      'pwg.images.add',
+      'ws_images_add',
       array(
         'file_sum' =>           array(),
@@ -327,5 +375,7 @@
     );
 
-  $service->addMethod('pwg.images.addSimple', 'ws_images_addSimple',
+  $service->addMethod(
+      'pwg.images.addSimple',
+      'ws_images_addSimple',
       array(
         'category' => array('default'=>null),
@@ -344,5 +394,7 @@
     );
 
-  $service->addMethod('pwg.images.delete', 'ws_images_delete',
+  $service->addMethod(
+      'pwg.images.delete',
+      'ws_images_delete',
       array(
         'image_id' =>   array('default'=>0),
@@ -352,10 +404,14 @@
     );
 
-  $service->addMethod('pwg.categories.getAdminList', 'ws_categories_getAdminList',
+  $service->addMethod(
+      'pwg.categories.getAdminList',
+      'ws_categories_getAdminList',
       null,
       'administration method only'
     );
 
-  $service->addMethod('pwg.categories.add', 'ws_categories_add',
+  $service->addMethod(
+      'pwg.categories.add',
+      'ws_categories_add',
       array(
         'name' =>         array(),
@@ -369,5 +425,7 @@
     );
 
-  $service->addMethod('pwg.categories.delete', 'ws_categories_delete',
+  $service->addMethod(
+      'pwg.categories.delete',
+      'ws_categories_delete',
       array(
         'category_id'=>           array('default'=>0),
@@ -380,5 +438,7 @@
     );
 
-  $service->addMethod('pwg.categories.move', 'ws_categories_move',
+  $service->addMethod(
+      'pwg.categories.move',
+      'ws_categories_move',
       array(
         'category_id' =>  array('default'=>0),
@@ -389,5 +449,7 @@
     );
 
-  $service->addMethod('pwg.categories.setRepresentative', 'ws_categories_setRepresentative',
+  $service->addMethod(
+      'pwg.categories.setRepresentative',
+      'ws_categories_setRepresentative',
       array(
         'category_id' =>  array('default'=>0),
@@ -397,15 +459,21 @@
     );
 
-  $service->addMethod('pwg.tags.getAdminList', 'ws_tags_getAdminList',
+  $service->addMethod(
+      'pwg.tags.getAdminList',
+      'ws_tags_getAdminList',
       null,
       'administration method only'
     );
 
-  $service->addMethod('pwg.tags.add', 'ws_tags_add',
+  $service->addMethod(
+      'pwg.tags.add',
+      'ws_tags_add',
       array('name'),
       'administration method only'
     );
 
-  $service->addMethod('pwg.images.exist', 'ws_images_exist',
+  $service->addMethod(
+      'pwg.images.exist',
+      'ws_images_exist',
       array(
         'md5sum_list' =>    array('default'=>null),
@@ -415,5 +483,7 @@
     );
 
-  $service->addMethod('pwg.images.checkFiles', 'ws_images_checkFiles',
+  $service->addMethod(
+      'pwg.images.checkFiles',
+      'ws_images_checkFiles',
       array(
         'image_id' =>       array(),
@@ -425,10 +495,14 @@
     );
 
-  $service->addMethod('pwg.images.checkUpload', 'ws_images_checkUpload',
+  $service->addMethod(
+      'pwg.images.checkUpload',
+      'ws_images_checkUpload',
       null,
       'check if Piwigo is ready for upload'
     );
 
-  $service->addMethod('pwg.images.setInfo', 'ws_images_setInfo',
+  $service->addMethod(
+      'pwg.images.setInfo',
+      'ws_images_setInfo',
       array(
         'image_id' =>       array(),
@@ -452,5 +526,7 @@
     );
 
-  $service->addMethod('pwg.categories.setInfo', 'ws_categories_setInfo',
+  $service->addMethod(
+      'pwg.categories.setInfo',
+      'ws_categories_setInfo',
       array(
         'category_id' =>  array(),
@@ -461,5 +537,7 @@
     );
   
-  $service->addMethod('pwg.plugins.getList', 'ws_plugins_getList',
+  $service->addMethod(
+      'pwg.plugins.getList',
+      'ws_plugins_getList',
       null,
       'Admin only
@@ -467,5 +545,7 @@
     );
 
-  $service->addMethod('pwg.plugins.performAction', 'ws_plugins_performAction',
+  $service->addMethod(
+      'pwg.plugins.performAction',
+      'ws_plugins_performAction',
       array('action', 'plugin', 'pwg_token'),
       'Admin only
@@ -473,10 +553,14 @@
     );
 
-  $service->addMethod('pwg.themes.performAction', 'ws_themes_performAction',
+  $service->addMethod(
+      'pwg.themes.performAction',
+      'ws_themes_performAction',
       array('action', 'theme', 'pwg_token'),
       'activate/deactivate/delete/set_default a theme<br>administration status required'
     );
 
-  $service->addMethod('pwg.extensions.update', 'ws_extensions_update',
+  $service->addMethod(
+      'pwg.extensions.update',
+      'ws_extensions_update',
       array('type', 'id', 'revision', 'pwg_token'),
       'Update an extension. Webmaster only.
@@ -484,5 +568,7 @@
   );
 
-  $service->addMethod('pwg.extensions.ignoreUpdate', 'ws_extensions_ignoreupdate',
+  $service->addMethod(
+      'pwg.extensions.ignoreUpdate',
+      'ws_extensions_ignoreupdate',
       array(
         'type' =>       array('default'=>null),
@@ -496,5 +582,7 @@
   );
 
-  $service->addMethod('pwg.extensions.checkUpdates', 'ws_extensions_checkupdates',
+  $service->addMethod(
+      'pwg.extensions.checkUpdates',
+      'ws_extensions_checkupdates',
       null,
       'Check if piwigo or extensions are up to date.'
