aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2009-12-18 00:44:30 +0000
committerplegall <plg@piwigo.org>2009-12-18 00:44:30 +0000
commit2a9b358dc8ebe8f1a077c88e7e7e49813c34a829 (patch)
tree48dc4adae2f54a9cd90d9acdf98e25683ca953f6 /include/ws_functions.inc.php
parent093eeb256465d13714e83f89c05f7bab629ae79f (diff)
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/branches/2.0@4510 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/ws_functions.inc.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 7b25a045f..26a205014 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