diff options
author | mistic100 <mistic@piwigo.org> | 2012-06-20 16:05:27 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2012-06-20 16:05:27 +0000 |
commit | 6ddf16ead6bd4922547a7dfbbad8622fc697fc7a (patch) | |
tree | e2ff88b7f66b30f294bc43c3f80b277f9348cf78 | |
parent | c8d097d3f86b9595e52bf754a2bcc2427593692e (diff) |
feature 2657: previous commit may work, but badly coded
git-svn-id: http://piwigo.org/svn/trunk@15852 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/ws_functions.inc.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 7f587f6ac..28319ab10 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -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')) ) { @@ -2334,6 +2329,11 @@ function ws_categories_add($params, &$service) array('id'=>$creation_output['id']) ); } + + if ( isset($updates['status']) and 'private' == $updates['status'] ) + { + add_permission_on_category($creation_output['id'], get_admins()); + } invalidate_user_cache(); |