From e2b5208aee17348c594c91bb90daf2736e251432 Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 6 Apr 2010 15:19:47 +0000 Subject: [PATCH] Fix for bug number 471. Tallies weren't adding up on the user list summary table at the bottom. --- admin/user_list.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/admin/user_list.php b/admin/user_list.php index d16e653..4b9e806 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -261,6 +261,8 @@ function neweditor() echo "{$r['year']}"; $first = true; + $complete = false; + $incomplete = false; foreach($types as $t) { if(!$first) echo ''; echo "{$user_what[$t]}"; @@ -277,13 +279,13 @@ function neweditor() echo ""; if(in_array($t, array('parent','committee','alumni','mentor','fair'))) { - /* Do nothing, there's nothign to complete */ + /* Do nothing, there's nothing to complete */ } else if($r["{$t}_complete"] == 'yes') { echo "
".i18n("yes")."
"; - $tally[$userstate]['complete']++; + $complete = true; } else { echo "
".i18n("no")."
"; - $tally[$userstate]['incomplete']++; + $incomplete = true; } echo ""; @@ -298,6 +300,12 @@ function neweditor() $first = false; } echo ''; + + if($complete){ + $tally[$userstate]['complete']++; + }else if($incomplete){ + $tally[$userstate]['incomplete']++; + } } echo "";