Properly handle empty judging teams

This commit is contained in:
james 2006-03-30 17:05:36 +00:00
parent 9f7aea3a57
commit 7ea92bbcb4
2 changed files with 10 additions and 4 deletions

View File

@ -55,12 +55,15 @@
$table['dataalign']=array("left","left","center","left","left"); $table['dataalign']=array("left","left","center","left","left");
foreach($teams AS $team) foreach($teams AS $team)
{
if(count($team['members']))
{ {
foreach($team['members'] AS $member) foreach($team['members'] AS $member)
{ {
$table['data'][]=array($team['num'],$team['name'],$member['captain'],$member['firstname'],$member['lastname']); $table['data'][]=array($team['num'],$team['name'],$member['captain'],$member['firstname'],$member['lastname']);
} }
} }
}
$rep->addTable($table); $rep->addTable($table);
$rep->output(); $rep->output();

View File

@ -70,10 +70,13 @@
$awardstr=substr($awardstr,0,-2); $awardstr=substr($awardstr,0,-2);
$rep->addText($awardstr); $rep->addText($awardstr);
if(count($team['members']))
{
foreach($team['members'] AS $member) foreach($team['members'] AS $member)
{ {
$table['data'][]=array($member['captain'],$member['firstname'],$member['lastname']); $table['data'][]=array($member['captain'],$member['firstname'],$member['lastname']);
} }
}
$rep->addTable($table); $rep->addTable($table);
$rep->nextline(); $rep->nextline();