aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-08-30 09:25:20 +0000
committerplegall <plg@piwigo.org>2011-08-30 09:25:20 +0000
commit3b8b9d8869e6372ae8709ea255ff7096be725400 (patch)
treefcaeb42ad1bd2c1b56d5482440aec088a7848726
parent3cee72474178d394f67428152f2bd4968c107165 (diff)
bug 2378 fixed: remove MySQL warning when synchronizing with simulation
activated. The warning occurs when there are new dircetories found. git-svn-id: http://piwigo.org/svn/branches/2.2@12011 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/site_update.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/admin/site_update.php b/admin/site_update.php
index 3a530dd6e..e3201104f 100644
--- a/admin/site_update.php
+++ b/admin/site_update.php
@@ -312,16 +312,16 @@ SELECT id_uppercat, MAX(rank)+1 AS next_rank
'visible','status','rank','global_rank'
);
mass_inserts(CATEGORIES_TABLE, $dbfields, $inserts);
+
+ // add default permissions to categories
+ $category_ids = array();
+ foreach ($inserts as $category)
+ {
+ $category_ids[] = $category['id'];
+ }
+ add_permission_on_category($category_ids, get_admins());
}
-
- // add default permissions to categories
- $category_ids = array();
- foreach ($inserts as $category)
- {
- $category_ids[] = $category['id'];
- }
- add_permission_on_category($category_ids, get_admins());
-
+
$counts['new_categories'] = count($inserts);
}