From ded83a19dac48848d97c3aca3ee8da6fad850358 Mon Sep 17 00:00:00 2001 From: flop25 Date: Wed, 31 Aug 2011 15:12:14 +0000 Subject: feature:2418 adding an option to apply permission of users to sub-albums changing the name of vars $private_uppercats->$private_cats git-svn-id: http://piwigo.org/svn/trunk@12019 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/cat_perm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'admin/cat_perm.php') diff --git a/admin/cat_perm.php b/admin/cat_perm.php index 961cf9f0f..0b7b0c51a 100644 --- a/admin/cat_perm.php +++ b/admin/cat_perm.php @@ -96,11 +96,11 @@ SELECT id WHERE id IN ('.$cat_ids.') AND status = \'private\' ;'; - $private_uppercats = array_from_query($query, 'id'); + $private_cats = array_from_query($query, 'id'); // We must not reinsert already existing lines in group_access table $granteds = array(); - foreach ($private_uppercats as $cat_id) + foreach ($private_cats as $cat_id) { $granteds[$cat_id] = array(); } @@ -108,7 +108,7 @@ SELECT id $query = ' SELECT group_id, cat_id FROM '.GROUP_ACCESS_TABLE.' - WHERE cat_id IN ('.implode(',', $private_uppercats).') + WHERE cat_id IN ('.implode(',', $private_cats).') AND group_id IN ('.implode(',', $_POST['grant_groups']).') ;'; $result = pwg_query($query); @@ -119,7 +119,7 @@ SELECT group_id, cat_id $inserts = array(); - foreach ($private_uppercats as $cat_id) + foreach ($private_cats as $cat_id) { $group_ids = array_diff($_POST['grant_groups'], $granteds[$cat_id]); foreach ($group_ids as $group_id) -- cgit v1.2.3