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
This commit is contained in:
plegall
2011-07-13 13:30:06 +00:00
parent b926cefe73
commit 50e1db0929
2 changed files with 112 additions and 1 deletions
+8
View File
@@ -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);
}