diff options
author | flop25 <flop25@piwigo.org> | 2011-08-31 13:25:07 +0000 |
---|---|---|
committer | flop25 <flop25@piwigo.org> | 2011-08-31 13:25:07 +0000 |
commit | dbf1ba470817ce1bd69c033b50fe0aee0f45f52c (patch) | |
tree | 0686362f8fba5284d05d6046ef9e19d229a7c4b8 /admin/cat_perm.php | |
parent | 2d52f65ce39407a16ba5b0c3c99c7e89fc2ad6f5 (diff) |
feature:2418
adding an option to apply permission of group to sub-albums
git-svn-id: http://piwigo.org/svn/trunk@12017 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/cat_perm.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/admin/cat_perm.php b/admin/cat_perm.php index 84a8d5784..961cf9f0f 100644 --- a/admin/cat_perm.php +++ b/admin/cat_perm.php @@ -88,10 +88,12 @@ else if (isset($_POST['grant_groups_submit']) and isset($_POST['grant_groups']) and count($_POST['grant_groups']) > 0) { + $cat_ids = (isset($_POST['apply_on_sub'])) ? implode(',', get_subcat_ids(array($page['cat']))).",".implode(',', get_uppercat_ids(array($page['cat']))) : implode(',', get_uppercat_ids(array($page['cat']))); + $query = ' SELECT id FROM '.CATEGORIES_TABLE.' - WHERE id IN ('.implode(',', get_uppercat_ids(array($page['cat']))).') + WHERE id IN ('.$cat_ids.') AND status = \'private\' ;'; $private_uppercats = array_from_query($query, 'id'); |