diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..3e8b5ad
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..8226516
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/phpbb_football_tlw.iml b/.idea/phpbb_football_tlw.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/phpbb_football_tlw.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/block/all_bets.php b/block/all_bets.php
index f94e9bb..b65ff46 100644
--- a/block/all_bets.php
+++ b/block/all_bets.php
@@ -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,