update, working on inter-season logic
This commit is contained in:
parent
66671b1e81
commit
beaba1d389
11 changed files with 45 additions and 1337 deletions
|
|
@ -75,14 +75,14 @@ class LeaguesController extends Controller
|
|||
return redirect("/seasons");
|
||||
}
|
||||
|
||||
public function showLeagueRounds($league_rank) {
|
||||
public function showLeagueRounds() {
|
||||
if (Auth::guest()) { return redirect("/"); }
|
||||
|
||||
$season=Season::getCurrent();
|
||||
|
||||
$roundNames = Round::getNames();
|
||||
$leagueNames = League::getNames();
|
||||
$leagues = League::where('season_id','=',$season->id)->where('rank','=', $league_rank)->orderBy('id')->get();
|
||||
$leagues = League::where('season_id','=',$season->id)->where('rank','<', 4)->orderBy('id')->get();
|
||||
$matchesTotal = array();
|
||||
|
||||
foreach ($leagues as $league) {
|
||||
|
|
@ -110,6 +110,7 @@ class LeaguesController extends Controller
|
|||
$userNames = User::getNames();
|
||||
|
||||
$leagueScores = League::getRanking($rank);
|
||||
|
||||
return view ('leagues.chart',compact('season','leagues', 'leagueNames', 'userNames','leagueScores'));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,6 @@ class UsersController extends Controller
|
|||
public function ranking($max_round_id, $seasonId=-1) {
|
||||
if (!Auth::user()) { return redirect("/"); }
|
||||
|
||||
|
||||
$startTime = microtime(true);
|
||||
|
||||
$season = Season::getCurrent();
|
||||
|
|
@ -220,7 +219,6 @@ class UsersController extends Controller
|
|||
$max_round_id=min($max_round_id, Round::getLastLockedRoundId());
|
||||
|
||||
|
||||
|
||||
// Payment made ?
|
||||
if (! User::payment_date(Auth::user()->id, $season->id) && Auth::user()->name!="Torsten Schneider") {
|
||||
return view('users.no_payment');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue