aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-07-20 05:19:37 +0000
committerrvelices <rv-github@modusoptimus.com>2009-07-20 05:19:37 +0000
commit30f0e85768e5efc84a8115b1b8544a525ae3c71e (patch)
treeb3566995ab30c11c14ab6b8a86815994552401b6
parent65a094fdc289df1aaa15c5f3d8df949aaabbe8b0 (diff)
correct bug in commit r3623 ( feature 1053 )
git-svn-id: http://piwigo.org/svn/branches/2.0@3641 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions_user.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index fac372852..c0932de2e 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) )