Skip to content

Commit

Permalink
Added proper match list to "finished matches"
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam svanåsbakken Crouch committed Oct 15, 2014
1 parent e0d3492 commit cd90b36
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion json/getMatchList.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,23 @@

$matchData['winner'] = $winnerArray;

$matchData['participants'] = MatchHandler::getParticipantString($match);
//$matchData['participants'] = MatchHandler::getParticipantString($match);

$participantData = array();
$participantData['list'] = array();

foreach($participantObjects as $participant) {
$data = array();

$data['name'] = $participant->getName();
$data['id'] = $participant->getId();
$data['tag'] = $participant->getTag();

array_push($participantData['list'], $data);
}


$matchData['participants'] = $participantData;

array_push($finishedArray, $matchData);
}
Expand Down

0 comments on commit cd90b36

Please sign in to comment.