aboutsummaryrefslogtreecommitdiffstats
path: root/admin/site_update.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-07-13 13:32:23 +0000
committerplegall <plg@piwigo.org>2011-07-13 13:32:23 +0000
commit424eed990e7b72e9e6453ccb3698a9bdcfd6195d (patch)
treec5e48e3ef8e114ffed09bf4f2220a8aff1ea07eb /admin/site_update.php
parent827de9b3ceec3c41d29ea693af5736074b31c64c (diff)
merge r11727 from branch 2.2 to trunk
feature 2245: when a new private album is added, the creator and admins automatically get permission on it. git-svn-id: http://piwigo.org/svn/trunk@11728 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/site_update.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/admin/site_update.php b/admin/site_update.php
index 5b90729b8..3a530dd6e 100644
--- a/admin/site_update.php
+++ b/admin/site_update.php
@@ -314,6 +314,14 @@ SELECT id_uppercat, MAX(rank)+1 AS next_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());
+
$counts['new_categories'] = count($inserts);
}