aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ws_functions.inc.php10
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();