From a8d561b0bb4bb377c13bfada1a4e0211dbe0f661 Mon Sep 17 00:00:00 2001 From: rvelices Date: Mon, 20 Jul 2009 05:18:53 +0000 Subject: correct bug in commit r3622 ( feature 1053 ) git-svn-id: http://piwigo.org/svn/trunk@3640 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_user.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index be1219324..68ca52a7f 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -332,12 +332,12 @@ SELECT COUNT(DISTINCT(image_id)) as total if ( !is_admin($userdata['status']) ) { // for non admins we forbid categories with no image (feature 1053) $forbidden_ids = array(); - foreach ($user_cache_cats as $cat_id => $cat) + foreach ($user_cache_cats as $cat) { if ($cat['count_images']==0) { - array_push($forbidden_ids, $cat_id); - unset( $user_cache_cats[$cat_id] ); + array_push($forbidden_ids, $cat['cat_id']); + unset( $user_cache_cats[$cat['cat_id']] ); } } if ( !empty($forbidden_ids) ) -- cgit v1.2.3