diff options
author | plegall <plg@piwigo.org> | 2009-12-18 00:45:03 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2009-12-18 00:45:03 +0000 |
commit | 975188d088f7dc554df05048091d6c6ebe43580d (patch) | |
tree | 56818e7139a446a425ad522a8d3d8e6d2568157b | |
parent | 9bbe72df1e0973da05968b38f97f9a435780246c (diff) |
merge r4510 from branch 2.0 to trunk
bug 1334 fixed: for POST mode on pwg.categories.setInfo, pwg.images.setInfo,
pwg.images.addChunk web API methods.
git-svn-id: http://piwigo.org/svn/trunk@4511 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/ws_functions.inc.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 073c3babf..432485dcf 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -891,6 +891,11 @@ function ws_images_add_chunk($params, &$service) return new PwgError(401, 'Access denied'); } + if (!$service->isPost()) + { + return new PwgError(405, "This method requires HTTP POST"); + } + $upload_dir = PHPWG_ROOT_PATH.'upload/buffer'; // create the upload directory tree if not exists @@ -1665,6 +1670,11 @@ function ws_images_setInfo($params, &$service) return new PwgError(401, 'Access denied'); } + if (!$service->isPost()) + { + return new PwgError(405, "This method requires HTTP POST"); + } + $params['image_id'] = (int)$params['image_id']; if ($params['image_id'] <= 0) { @@ -1944,6 +1954,11 @@ function ws_categories_setInfo($params, &$service) return new PwgError(401, 'Access denied'); } + if (!$service->isPost()) + { + return new PwgError(405, "This method requires HTTP POST"); + } + // category_id // name // comment |