From 6c90033ede266fac02971f5a069a635a196b58bd Mon Sep 17 00:00:00 2001 From: Julian Arndt Date: Thu, 8 Jun 2023 21:07:33 +0200 Subject: [PATCH] Fix charts --- includes/chart_hist.php | 5 ----- includes/chart_points.php | 5 ----- includes/chart_rank.php | 6 +----- includes/functions.php | 2 +- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/includes/chart_hist.php b/includes/chart_hist.php index 4fc3a0e..acd536d 100644 --- a/includes/chart_hist.php +++ b/includes/chart_hist.php @@ -9,11 +9,6 @@ * */ -if (!defined('IN_PHPBB')) -{ - exit; -} - $values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0; $graphvalues1 = explode(",",$values1); $matchdays = sizeof($graphvalues1); diff --git a/includes/chart_points.php b/includes/chart_points.php index 1d9fa76..737e7e3 100644 --- a/includes/chart_points.php +++ b/includes/chart_points.php @@ -8,11 +8,6 @@ * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ -if (!defined('IN_PHPBB')) -{ - exit; -} - $matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0; $values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0; diff --git a/includes/chart_rank.php b/includes/chart_rank.php index b58b474..e7aa58c 100644 --- a/includes/chart_rank.php +++ b/includes/chart_rank.php @@ -8,11 +8,6 @@ * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ -if (!defined('IN_PHPBB')) -{ - exit; -} - $numb_users = ( isset($_GET['t']) ) ? intval($_GET['t']) : 0; $matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0; @@ -96,6 +91,7 @@ for ($i = 1; $i < $count_values; $i++) imageline($image, $i * $vert, ($graphValues4[$i - 1] * $horz), ($i + 1) * $vert, ($graphValues4[$i] * $horz), $colorRed); } + // Output graph and clear image from memory imagepng($image); imagedestroy($image); diff --git a/includes/functions.php b/includes/functions.php index a915eb9..081c675 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -2612,7 +2612,7 @@ function bonuspoints($season, $league, $matchday) array_push ( $id, $row['team_id_home']); } $i = 0; - while($id[$i]) + while($i < count($id)) { $tmp = $id[$i]; $sql = 'UPDATE ' . FOOTB_BONUS_DAY . " SET home = '1' WHERE season = '$season' AND league = '$league2' AND matchday = '$matchday' AND team_id = '$tmp'";