From 16371ed5fd9f0df6e8c3d6d349845bc2ec057081 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 23 Dec 2010 10:22:51 +0000 Subject: feature 2083 added: implement method pwg.images.addSimple in core makes admin/include/function_upload.inc.php not dependant from include/ws_functions.inc.php (moves functions file_path_for_type and ready_for_upload_message) cleaner method to initialize the upload settings git-svn-id: http://piwigo.org/svn/trunk@8249 68402e56-0260-453c-a942-63ccdbb3a9ee --- ws.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ws.php') diff --git a/ws.php b/ws.php index 1287a3c12..33006d413 100644 --- a/ws.php +++ b/ws.php @@ -220,6 +220,23 @@ function ws_addDefaultMethods( $arr )
categories is a string list "category_id[,rank];category_id[,rank]" The rank is optional and is equivalent to "auto" if not given.' ); + $service->addMethod( + 'pwg.images.addSimple', + 'ws_images_addSimple', + array( + 'category' => array('default' => null), + 'name' => array('default' => null), + 'author' => array('default' => null), + 'comment' => array('default' => null), + 'level' => array( + 'default' => 0, + 'maxValue' => $conf['available_permission_levels'] + ), + 'tags' => array('default' => null), + ), + '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.categories.getAdminList', 'ws_categories_getAdminList', -- cgit v1.2.3