aboutsummaryrefslogtreecommitdiffstats
path: root/ws.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-04-29 17:38:59 +0000
committerpatdenice <patdenice@piwigo.org>2011-04-29 17:38:59 +0000
commit0db141fc62c90de376a2658868a0c3f42f45395b (patch)
treeba4bb2c2704ff27ec1606a08772389e201e31b3a /ws.php
parent4f8e0b54acae2ee65f6f2cdebcb8e830064febb5 (diff)
feature:2259
Create two different methods in webservice to create/regenerate thumbnail and to regenerate websize. git-svn-id: http://piwigo.org/svn/trunk@10686 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--ws.php36
1 files changed, 23 insertions, 13 deletions
diff --git a/ws.php b/ws.php
index a328c94f0..d1d774899 100644
--- a/ws.php
+++ b/ws.php
@@ -405,25 +405,35 @@ function ws_addDefaultMethods( $arr )
);
$service->addMethod(
- 'pwg.images.resize',
- 'ws_images_resize',
+ 'pwg.images.resizeThumbnail',
+ 'ws_images_resizethumbnail',
array(
'image_id' => array('default' => null),
'image_path' => array('default' => null),
- 'type' => array('default' => 'thumbnail'),
+ 'maxwidth' => array('default' => $conf['upload_form_thumb_maxwidth']),
+ 'maxheight' => array('default' => $conf['upload_form_thumb_maxheight']),
+ 'quality' => array('default' => $conf['upload_form_thumb_quality']),
+ 'crop' => array('default' => $conf['upload_form_thumb_crop']),
+ 'follow_orientation' => array('default' => $conf['upload_form_thumb_follow_orientation']),
+ 'library' => array('default' => $conf['graphics_library']),
+ ),
+ 'Create/Regenerate thumbnails photo with given arguments.
+<br>One of arguments "image_id" or "image_path" must be sent.'
+ );
+
+ $service->addMethod(
+ 'pwg.images.resizeWebsize',
+ 'ws_images_resizewebsize',
+ array(
+ 'image_id' => array(),
+ 'maxwidth' => array('default' => $conf['upload_form_websize_maxwidth']),
+ 'maxheight' => array('default' => $conf['upload_form_websize_maxheight']),
+ 'quality' => array('default' => $conf['upload_form_websize_quality']),
'automatic_rotation' => array('default' => $conf['upload_form_automatic_rotation']),
'library' => array('default' => $conf['graphics_library']),
- 'maxwidth' => array('default' => null),
- 'maxheight' => array('default' => null),
- 'crop' => array('default' => null),
- 'follow_orientation' => array('default' => null),
- 'quality' => array('default' => null),
),
- 'Create/Regenerate thumbnails or websize photo with given arguments.
-<br>One of arguments "image_id" or "image_path" must be passed filled.
-<br>Argument "type" can be "thumbnail" or "websize". Default is "thumbnail".
-<br>If maxwidth, maxheight, crop, follow_orientation or quality are missing, default parameters of upload will be used.'
-);
+ 'Regenerate websize photo with given arguments.'
+ );
$service->addMethod(
'pwg.extensions.update',