Skip to content

Commit

Permalink
merge r4510 from branch 2.0 to trunk
Browse files Browse the repository at this point in the history
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
  • Loading branch information
plegall committed Dec 18, 2009
1 parent 9bbe72d commit 975188d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/ws_functions.inc.php
Expand Up @@ -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
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 975188d

Please sign in to comment.