show unplayed rounds
This commit is contained in:
parent
98ebdb6c93
commit
7545760aa2
5 changed files with 47 additions and 29 deletions
|
|
@ -88,13 +88,14 @@ class League extends Model
|
|||
|
||||
$matches=Match::getMatchResults($league->id,-1);
|
||||
foreach ($matches as $match) {
|
||||
if (!Round::isCompleted($match->round_id)) { continue; }
|
||||
$memberScores[$match->user1_id][1] += $match->user1_league_score;
|
||||
$memberScores[$match->user1_id][2] += $match->user1_rankscore;
|
||||
$memberScores[$match->user1_id][3] += $match->user2_rankscore;
|
||||
$memberScores[$match->user2_id][1] += $match->user2_league_score;
|
||||
$memberScores[$match->user2_id][2] += $match->user2_rankscore;
|
||||
$memberScores[$match->user2_id][3] += $match->user1_rankscore;
|
||||
if (Round::isCompleted($match->round_id)) {
|
||||
$memberScores[$match->user1_id][1] += $match->user1_league_score;
|
||||
$memberScores[$match->user1_id][2] += $match->user1_rankscore;
|
||||
$memberScores[$match->user1_id][3] += $match->user2_rankscore;
|
||||
$memberScores[$match->user2_id][1] += $match->user2_league_score;
|
||||
$memberScores[$match->user2_id][2] += $match->user2_rankscore;
|
||||
$memberScores[$match->user2_id][3] += $match->user1_rankscore;
|
||||
}
|
||||
}
|
||||
usort($memberScores, array('App\Leagues\League','cmpScore'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue