Bugfix roundcase for edgecase lastRound
This commit is contained in:
parent
30f6157606
commit
5515e13f02
1 changed files with 4 additions and 2 deletions
|
|
@ -271,6 +271,8 @@ class Tipp extends Model
|
||||||
$user_ids=array();
|
$user_ids=array();
|
||||||
$round_ids=array();
|
$round_ids=array();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Write sql result to roundtipps (score per round & user)
|
// Write sql result to roundtipps (score per round & user)
|
||||||
if ($max_round_id==-1) { $max_round_id=Round::getLastCompleteRoundId(); }
|
if ($max_round_id==-1) { $max_round_id=Round::getLastCompleteRoundId(); }
|
||||||
foreach ($result as $entry) {
|
foreach ($result as $entry) {
|
||||||
|
|
@ -466,9 +468,9 @@ class Tipp extends Model
|
||||||
if ($round_count==$quotas["Runden"]) {
|
if ($round_count==$quotas["Runden"]) {
|
||||||
// Ranking Payout ausschütten
|
// Ranking Payout ausschütten
|
||||||
$payout_groups =array();
|
$payout_groups =array();
|
||||||
|
$lastRoundId= array_values(array_slice($round_ids,-1))[0];
|
||||||
foreach($user_ids as $user_id) {
|
foreach($user_ids as $user_id) {
|
||||||
$key = $round_count."_".$user_id;
|
$key = $lastRoundId."_".$user_id;
|
||||||
$rank = $roundtipps[$key]["rank"];
|
$rank = $roundtipps[$key]["rank"];
|
||||||
//Log::info("Setting ranking_payout for user_id ".$user_id);
|
//Log::info("Setting ranking_payout for user_id ".$user_id);
|
||||||
//TODO: Do it for any number of rank payouts
|
//TODO: Do it for any number of rank payouts
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue