Ejemplo n.º 1
0
 function get_current_league()
 {
     if ($this->currentLeague) {
         return $this->currentLeague;
     }
     $league = null;
     $db = new KKL_DB();
     if ($_GET['game_day_filter']) {
         $league = $db->getLeagueForGameday($_GET['game_day_filter']);
     } elseif ($_GET['season_filter']) {
         $league = $db->getLeagueForSeason($_GET['season_filter']);
     } elseif ($_GET['league_filter']) {
         $league = $db->getLeague($_GET['league_filter']);
     } else {
         $default_league = get_user_option('kkl_ligatool_default_league');
         if ($default_league) {
             $league = $db->getLeague($default_league);
         }
     }
     $this->currentLeague = $league;
     return $league;
 }