summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_rrd_graph_img.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-14 16:49:43 +0545
committerRenato Botelho <garga@FreeBSD.org>2015-05-14 08:53:17 -0300
commit448161bac87086a772310bec897e93c7b6aca473 (patch)
tree976052bb972782f075f3591050db181f0d300d52 /usr/local/www/status_rrd_graph_img.php
parentdb7d66e7771b13b0598523773c6ee4e2889f1a8c (diff)
downloadpfsense-448161bac87086a772310bec897e93c7b6aca473.zip
pfsense-448161bac87086a772310bec897e93c7b6aca473.tar.gz
Add some curlies in status_rrd_graph_img
These "if data" tests look like they should apply to all 4 lines below them. After sorting out this real-looking issue, I can mess with the rest of the formatting...
Diffstat (limited to 'usr/local/www/status_rrd_graph_img.php')
-rw-r--r--usr/local/www/status_rrd_graph_img.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index a5fac63..a30d4e3 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -1230,19 +1230,21 @@ else {
/* check modification time to see if we need to generate image */
if (file_exists("$rrdtmppath$curdatabase-$curgraph.png")) {
- if((time() - filemtime("$rrdtmppath$curdatabase-$curgraph.png")) >= 15 ) {
- if($data)
+ if ((time() - filemtime("$rrdtmppath$curdatabase-$curgraph.png")) >= 15 ) {
+ if ($data) {
$_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn);
$graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd;
flush();
usleep(500);
- }
+ }
+ }
} else {
- if($data)
+ if ($data) {
$_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn);
$graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd;
flush();
usleep(500);
+ }
}
if(($graphcmdreturn <> 0) || (! $data)) {
log_error(sprintf(gettext('Failed to create graph with error code %1$s, the error is: %2$s'),$graphcmdreturn,$graphcmdoutput));
OpenPOWER on IntegriCloud