Fix warning in all bets when no bets are shown.
This commit is contained in:
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
6
.idea/misc.xml
generated
Normal file
6
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" project-jdk-name="openjdk-14" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/phpbb_football_tlw.iml" filepath="$PROJECT_DIR$/.idea/phpbb_football_tlw.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
9
.idea/phpbb_football_tlw.iml
generated
Normal file
9
.idea/phpbb_football_tlw.iml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -214,64 +214,67 @@ foreach ($matches AS $match)
|
||||
$count_user = 0;
|
||||
$bet_index = 0;
|
||||
$last_match_index = 0;
|
||||
foreach ($bet_line[$split_index] AS $user_bet)
|
||||
{
|
||||
if ($bet_index == 0)
|
||||
{
|
||||
$count_user++;
|
||||
$league_info = league_info($season, $league);
|
||||
if ($league_info['bet_type'])
|
||||
{
|
||||
$row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||
}
|
||||
else
|
||||
{
|
||||
$row_class = (!(($count_user + ($count_user % 2)) % 4)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||
}
|
||||
if ($user_bet['user_id'] == $user->data['user_id'])
|
||||
{
|
||||
$row_class = 'bg3 row_user';
|
||||
}
|
||||
$template->assign_block_vars('match_panel.user_row', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
'USER_NAME' => $user_bet['username'],
|
||||
)
|
||||
);
|
||||
$total = 0;
|
||||
}
|
||||
$bet_index++;
|
||||
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||
if ($user_bet['status'] < 3)
|
||||
{
|
||||
$colorstyle_total = ' color_provisionally';
|
||||
}
|
||||
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
||||
{
|
||||
// hide bets
|
||||
$bet_home = ($user_bet['bet_home'] == '') ? ' ' : '?';
|
||||
$bet_guest = ($user_bet['bet_guest'] == '') ? ' ' : '?';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bet_home = $user_bet['bet_home'];
|
||||
$bet_guest = $user_bet['bet_guest'];
|
||||
}
|
||||
|
||||
$colorstyle_bet = color_style($user_bet['status']);
|
||||
$template->assign_block_vars('match_panel.user_row.bet', array(
|
||||
'BET' => $bet_home. ':'. $bet_guest,
|
||||
'COLOR_STYLE' => $colorstyle_bet,
|
||||
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
||||
)
|
||||
);
|
||||
if(!empty($bet_line))
|
||||
{
|
||||
foreach ($bet_line[$split_index] AS $user_bet)
|
||||
{
|
||||
if ($bet_index == 0)
|
||||
{
|
||||
$count_user++;
|
||||
$league_info = league_info($season, $league);
|
||||
if ($league_info['bet_type'])
|
||||
{
|
||||
$row_class = (!($count_user % 2)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||
}
|
||||
else
|
||||
{
|
||||
$row_class = (!(($count_user + ($count_user % 2)) % 4)) ? 'bg1 row_light' : 'bg2 row_dark';
|
||||
}
|
||||
if ($user_bet['user_id'] == $user->data['user_id'])
|
||||
{
|
||||
$row_class = 'bg3 row_user';
|
||||
}
|
||||
$template->assign_block_vars('match_panel.user_row', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
'USER_NAME' => $user_bet['username'],
|
||||
)
|
||||
);
|
||||
$total = 0;
|
||||
}
|
||||
$bet_index++;
|
||||
$total += ($user_bet['points'] == '') ? 0 : $user_bet['points'];
|
||||
if ($user_bet['status'] < 3)
|
||||
{
|
||||
$colorstyle_total = ' color_provisionally';
|
||||
}
|
||||
if ($user_bet['status'] < 1 && !$config['football_view_bets'])
|
||||
{
|
||||
// hide bets
|
||||
$bet_home = ($user_bet['bet_home'] == '') ? ' ' : '?';
|
||||
$bet_guest = ($user_bet['bet_guest'] == '') ? ' ' : '?';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bet_home = $user_bet['bet_home'];
|
||||
$bet_guest = $user_bet['bet_guest'];
|
||||
}
|
||||
|
||||
if ($bet_index == $split_after)
|
||||
{
|
||||
$sum_total[$user_bet['username']] += $total;
|
||||
$matchday_sum_total += $total;
|
||||
$bet_index = 0;
|
||||
}
|
||||
}
|
||||
$colorstyle_bet = color_style($user_bet['status']);
|
||||
$template->assign_block_vars('match_panel.user_row.bet', array(
|
||||
'BET' => $bet_home. ':'. $bet_guest,
|
||||
'COLOR_STYLE' => $colorstyle_bet,
|
||||
'POINTS' => ($user_bet['points'] == '') ? ' ' : $user_bet['points'],
|
||||
)
|
||||
);
|
||||
|
||||
if ($bet_index == $split_after)
|
||||
{
|
||||
$sum_total[$user_bet['username']] += $total;
|
||||
$matchday_sum_total += $total;
|
||||
$bet_index = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_block_vars('match_panel.tendency_footer', array(
|
||||
'S_TOTAL' => false,
|
||||
|
||||
Reference in New Issue
Block a user