aboutsummaryrefslogtreecommitdiffstats
path: root/admin/site_update.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-07-13 13:30:06 +0000
committerplegall <plg@piwigo.org>2011-07-13 13:30:06 +0000
commit50e1db0929cd11bd87a7a5573bfae1b6a72de8e4 (patch)
tree6c61cb4612e576ffc0811d5712b23c641964b7f3 /admin/site_update.php
parentb926cefe73bd60378080211e73813e13ae80642b (diff)
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/branches/2.2@11727 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/site_update.php')
-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);
}