forked from science-ation/science-ation
Properly handle empty judging teams
This commit is contained in:
parent
9f7aea3a57
commit
7ea92bbcb4
@ -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();
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user