feature 2657: previous commit may work, but badly coded

git-svn-id: http://piwigo.org/svn/trunk@15852 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100 2012-06-20 16:05:27 +00:00
parent c8d097d3f8
commit 6ddf16ead6

View file

@ -2307,11 +2307,6 @@ function ws_categories_add($params, &$service)
if ( !empty($params['status']) and in_array($params['status'], array('private','public')) )
{
$updates['status'] = $params['status'];
if ('private' == $updates['status'])
{
add_permission_on_category($creation_output['id'], get_admins());
}
}
if ( !empty($params['visible']) and in_array($params['visible'], array('true','false')) )
{
@ -2335,6 +2330,11 @@ function ws_categories_add($params, &$service)
);
}
if ( isset($updates['status']) and 'private' == $updates['status'] )
{
add_permission_on_category($creation_output['id'], get_admins());
}
invalidate_user_cache();
return $creation_output;