Bugfix Round::getFirstTippableRound
This commit is contained in:
parent
c337916a3b
commit
922db48c36
3 changed files with 12518 additions and 5 deletions
|
|
@ -125,9 +125,9 @@ class Round extends Model
|
|||
public static function getFirstTippableRoundId($seasonId=-1) {
|
||||
$season=null;
|
||||
if ($seasonId==-1) {
|
||||
$currentSeason=Season::getCurrent();
|
||||
$season=Season::getCurrent();
|
||||
} else {
|
||||
$currentSeason=Season::where('id','=', $seasonId)->first();
|
||||
$season=Season::where('id','=', $seasonId)->first();
|
||||
}
|
||||
if (!$season) return null;
|
||||
|
||||
|
|
@ -139,13 +139,14 @@ class Round extends Model
|
|||
public static function getFirstTippableRound($seasonId=-1) {
|
||||
$season=null;
|
||||
if ($seasonId==-1) {
|
||||
$currentSeason=Season::getCurrent();
|
||||
$season=Season::getCurrent();
|
||||
} else {
|
||||
$currentSeason=Season::where('id','=', $seasonId)->first();
|
||||
$season=Season::where('id','=', $seasonId)->first();
|
||||
}
|
||||
if (!$season) return null;
|
||||
|
||||
$rounds=Round::where('season_id','=',$season->id)->orderBy('id')->get();
|
||||
|
||||
$locked = false;
|
||||
foreach ($rounds as $round) {
|
||||
if (!Round::hasLockedGame($round->id) ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue