bug 2003 fixed: random failure on calling invalidate_user_cache. I move the

include of admin functions outside conditional blocks, even if we should also
enter the first block.


git-svn-id: http://piwigo.org/svn/branches/2.1@7612 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2010-11-03 22:23:18 +00:00
parent db9464e820
commit d8cf938800

View file

@ -1806,6 +1806,8 @@ function ws_images_setInfo($params, &$service)
return new PwgError(WS_ERR_INVALID_PARAM, "Invalid image_id"); return new PwgError(WS_ERR_INVALID_PARAM, "Invalid image_id");
} }
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
$query=' $query='
SELECT * SELECT *
FROM '.IMAGES_TABLE.' FROM '.IMAGES_TABLE.'
@ -1861,7 +1863,6 @@ SELECT *
{ {
$update['id'] = $params['image_id']; $update['id'] = $params['image_id'];
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
mass_updates( mass_updates(
IMAGES_TABLE, IMAGES_TABLE,
array( array(
@ -1884,8 +1885,6 @@ SELECT *
// and now, let's create tag associations // and now, let's create tag associations
if (isset($params['tag_ids'])) if (isset($params['tag_ids']))
{ {
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
$tag_ids = explode(',', $params['tag_ids']); $tag_ids = explode(',', $params['tag_ids']);
if ('replace' == $params['multiple_value_mode']) if ('replace' == $params['multiple_value_mode'])