summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_rrd_graph.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-06-15 14:19:11 +0545
committerPhil Davis <phil.davis@inf.org>2015-06-15 14:19:11 +0545
commit6c07db487164262f9191ad02805523bd153e0ba6 (patch)
tree0c266356179ac730233a16c0e3767a0c22514c4d /usr/local/www/status_rrd_graph.php
parent67d9685607eef7c679fda929ad4855be1b2f9dec (diff)
downloadpfsense-6c07db487164262f9191ad02805523bd153e0ba6.zip
pfsense-6c07db487164262f9191ad02805523bd153e0ba6.tar.gz
Code spacing
and other random stuff I noticed. I think this finishes messing with code style. The codebase should match the developer style guide closely enough that 99.9% of changes will not feel the need to also massage the formatting.
Diffstat (limited to 'usr/local/www/status_rrd_graph.php')
-rw-r--r--usr/local/www/status_rrd_graph.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index 94111bc..ae9c709 100644
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -47,7 +47,7 @@ require_once("rrd.inc");
unset($input_errors);
/* if the rrd graphs are not enabled redirect to settings page */
-if (! isset($config['rrd']['enable'])) {
+if (!isset($config['rrd']['enable'])) {
header("Location: status_rrd_graph_settings.php");
}
@@ -59,7 +59,7 @@ $databases = glob("*.rrd");
if ($_GET['cat']) {
$curcat = htmlspecialchars($_GET['cat']);
} else {
- if (! empty($config['rrd']['category'])) {
+ if (!empty($config['rrd']['category'])) {
$curcat = $config['rrd']['category'];
} else {
$curcat = "system";
@@ -75,7 +75,7 @@ if ($_GET['zone']) {
if ($_GET['period']) {
$curperiod = $_GET['period'];
} else {
- if (! empty($config['rrd']['period'])) {
+ if (!empty($config['rrd']['period'])) {
$curperiod = $config['rrd']['period'];
} else {
$curperiod = "absolute";
@@ -193,12 +193,13 @@ $styles = array('inverse' => gettext('Inverse'),
$curstyle = "inverse";
if ($_GET['style']) {
- foreach ($styles as $style)
+ foreach ($styles as $style) {
if (strtoupper($style) == strtoupper($_GET['style'])) {
$curstyle = $_GET['style'];
}
+ }
} else {
- if (! empty($config['rrd']['style'])) {
+ if (!empty($config['rrd']['style'])) {
$curstyle = $config['rrd']['style'];
} else {
$curstyle = "inverse";
@@ -259,7 +260,7 @@ $graph_length = array(
"year" => 31622400,
"fouryear" => 126230400);
-$pgtitle = array(gettext("Status"),gettext("RRD Graphs"));
+$pgtitle = array(gettext("Status"), gettext("RRD Graphs"));
$closehead = false;
@@ -558,7 +559,7 @@ function get_dates($curperiod, $graph) {
}
}
foreach ($ui_databases as $db => $database) {
- if (! preg_match("/($curcat)/i", $database)) {
+ if (!preg_match("/($curcat)/i", $database)) {
continue;
}
@@ -669,7 +670,7 @@ function get_dates($curperiod, $graph) {
foreach ($graphs as $graph) {
/* check which databases are valid for our category */
foreach ($ui_databases as $curdatabase) {
- if (! preg_match("/($curcat)/i", $curdatabase)) {
+ if (!preg_match("/($curcat)/i", $curdatabase)) {
continue;
}
@@ -707,7 +708,7 @@ function get_dates($curperiod, $graph) {
continue 2;
}
}
- if (! preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
continue 2;
}
break;
@@ -719,7 +720,7 @@ function get_dates($curperiod, $graph) {
break;
default:
/* just use the name here */
- if (! preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
continue 2;
}
}
@@ -752,7 +753,7 @@ function get_dates($curperiod, $graph) {
foreach ($graphs as $graph) {
/* check which databases are valid for our category */
foreach ($ui_databases as $curdatabase) {
- if (! stristr($curdatabase, $curcat)) {
+ if (!stristr($curdatabase, $curcat)) {
continue;
}
$optionc = explode("-", $curdatabase);
@@ -785,7 +786,7 @@ function get_dates($curperiod, $graph) {
continue 2;
}
}
- if (! preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
continue 2;
}
break;
@@ -797,7 +798,7 @@ function get_dates($curperiod, $graph) {
break;
default:
/* just use the name here */
- if (! preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
continue 2;
}
}
OpenPOWER on IntegriCloud