if ($entry->isExcluded()) continue;
$entry_id = $entry->getId();
if (in_array($entry_id, array_values($ret))) continue;
- $competitor_id = $entry->getShip()->getCompetitor()->getId();
+ $competitor_id = $entry->getShip()->getCompetitorId();
if (in_array($competitor_id, $competitors)) continue;
- $competitors[] = $competitor_id;
- if (is_null($ret['leader'])) $ret['leader'] = $entry_id;
+ if (is_null($ret['leader'])) {
+ $ret['leader'] = $entry_id;
+ $competitors[] = $competitor_id;
+ }
else if (is_null($ret['runnerup'])) {
$ret['runnerup'] = $entry_id;
+ $competitors[] = $competitor_id;
break;
}
}
if ($entry->isExcluded()) continue;
$entry_id = $entry->getId();
if (in_array($entry_id, array_values($ret))) continue;
+ $competitor_id = $entry->getShip()->getCompetitorId();
+ if (in_array($competitor_id, $competitors)) continue;
$ret[$key] = $entry_id;
+ $competitors[] = $competitor_id;
+ break;
}
}