aboutsummaryrefslogtreecommitdiffstats
path: root/admin/cat_perm.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-10-30 20:14:32 +0000
committermistic100 <mistic@piwigo.org>2013-10-30 20:14:32 +0000
commitc64eb85452aa7bb6d9c478db52aa59a81fa6752a (patch)
treef80a97dc39d5bac02fd26944871642bd11992c0a /admin/cat_perm.php
parenta1f414324b740551f32c88c52da280fb8c59c858 (diff)
mistakenly removed status check in previous commit + same thing for users
git-svn-id: http://piwigo.org/svn/trunk@25244 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/cat_perm.php')
-rw-r--r--admin/cat_perm.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index d8f3694e7..fa24e21be 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -99,8 +99,16 @@ DELETE
$cat_ids = array_merge($cat_ids, get_subcat_ids(array($page['cat'])));
}
+ $query = '
+SELECT id
+ FROM '.CATEGORIES_TABLE.'
+ WHERE id IN ('.implode(',', $cat_ids).')
+ AND status = \'private\'
+;';
+ $private_cats = array_from_query($query, 'id');
+
$inserts = array();
- foreach ($cat_ids as $cat_id)
+ foreach ($private_cats as $cat_id)
{
foreach ($grant_groups as $group_id)
{