From cd55ead3e2810e209b726faca12fa749f6875d0f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 16 Dec 2017 18:33:16 +0100 Subject: Fix A LOT of type problems, logic flaws, uninitialized variables etc. Most of them were found by phpstorm, so I put in some time and went through the list, fixing quite a bunch of them. --- modules-available/statistics/page.inc.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules-available/statistics/page.inc.php') diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index c3ecf52b..bd67123e 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -622,7 +622,6 @@ class Page_Statistics extends Page . ' badsectors ' . $xtra . ' FROM machine' . " $join WHERE $where $sort", $args); $rows = array(); - $NOW = time(); $singleMachine = 'none'; while ($row = $res->fetch(PDO::FETCH_ASSOC)) { if ($singleMachine === 'none') { @@ -894,7 +893,7 @@ class Page_Statistics extends Page continue; // Don't differentiate between session and idle for non-clients if ($first && $row['dateline'] > $cutoff && $client['lastboot'] > $cutoff) { // Special case: offline before - $spans['graph'] .= '
 
'; + $spans['graph'] .= '
 
'; } $first = false; if ($row['dateline'] + $row['data'] < $cutoff || $row['data'] > 864000) { @@ -931,10 +930,10 @@ class Page_Statistics extends Page } if ($first && $client['lastboot'] > $cutoff) { // Special case: offline before - $spans['graph'] .= '
 
'; + $spans['graph'] .= '
 
'; } elseif ($first) { // Not seen in last two weeks - $spans['graph'] .= '
 
'; + $spans['graph'] .= '
 
'; } if (isset($client['state_occupied'])) { $spans['graph'] .= '
 
'; -- cgit v1.2.3-55-g7522