Readd rank_matchday in all sites and add check for correct league --> Display of rank_matchday works on table and results_tl site.

This commit is contained in:
2018-04-03 19:24:37 +02:00
parent 889ff05ca6
commit 66b2a1a8d0
2 changed files with 12 additions and 4 deletions

View File

@@ -12,6 +12,15 @@ if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
exit; exit;
} }
if ($league > 50)
{
$league_corr = $league - 50;
}
else
{
$league_corr = $league;
}
if ($league <> 0) if ($league <> 0)
{ {
$data_rank_matchday = false; $data_rank_matchday = false;
@@ -26,7 +35,7 @@ if ($league <> 0)
FROM " . FOOTB_RANKS . ' AS r FROM " . FOOTB_RANKS . ' AS r
LEFT Join ' . USERS_TABLE . " AS u ON (r.user_id = u.user_id) LEFT Join ' . USERS_TABLE . " AS u ON (r.user_id = u.user_id)
WHERE r.season = $season WHERE r.season = $season
AND r.league = $league AND r.league = $league_corr
AND r.matchday = $matchday AND r.matchday = $matchday
AND r.status IN (2,3) AND r.status IN (2,3)
ORDER BY rank ASC, LOWER(u.username) ASC"; ORDER BY rank ASC, LOWER(u.username) ASC";
@@ -50,7 +59,7 @@ if ($league <> 0)
'ROW_CLASS' => $row_class, 'ROW_CLASS' => $row_class,
'USERID' => $row['user_id'], 'USERID' => $row['user_id'],
'USERNAME' => $row['username'], 'USERNAME' => $row['username'],
'U_BET_USER' => $this->helper->route('football_football_popup', array('popside' => 'bet_popup', 's' => $season, 'l' => $league, 'U_BET_USER' => $this->helper->route('football_football_popup', array('popside' => 'bet_popup', 's' => $season, 'l' => $league_corr,
'm' => $matchday, 'u' => $row['user_id'])), 'm' => $matchday, 'u' => $row['user_id'])),
'POINTS' => $row['points'], 'POINTS' => $row['points'],
'COLOR_STYLE' => $colorstyle, 'COLOR_STYLE' => $colorstyle,
@@ -60,7 +69,7 @@ if ($league <> 0)
} }
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$league_info = league_info($season, $league); $league_info = league_info($season, $league_corr);
$template->assign_vars(array( $template->assign_vars(array(
'S_DISPLAY_RANK_MATCHDAY' => true, 'S_DISPLAY_RANK_MATCHDAY' => true,

View File

@@ -932,7 +932,6 @@ class main
{ {
include($this->football_root_path . 'block/table.' . $this->php_ext); include($this->football_root_path . 'block/table.' . $this->php_ext);
} }
elseif ($league > 50) {/* do nothing */}
else else
{ {
include($this->football_root_path . 'block/rank_matchday.' . $this->php_ext); include($this->football_root_path . 'block/rank_matchday.' . $this->php_ext);