From 424eed990e7b72e9e6453ccb3698a9bdcfd6195d Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 13 Jul 2011 13:32:23 +0000 Subject: 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 --- admin/site_update.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'admin/site_update.php') 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); } -- cgit v1.2.3