summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2007-07-06 21:41:37 +0000
committerSeth Mos <seth.mos@xs4all.nl>2007-07-06 21:41:37 +0000
commit2ab73e04d050c5b57f3b64cfbacc372c558bacf1 (patch)
treec15507cb457efa9ec478baba43bcaeb725ae06ed /usr
parent8a58063d2829acd0186798fe2345b6fb647f3338 (diff)
downloadpfsense-2ab73e04d050c5b57f3b64cfbacc372c558bacf1.zip
pfsense-2ab73e04d050c5b57f3b64cfbacc372c558bacf1.tar.gz
Use pattern matching for proper database selection.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/status_rrd_graph.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index b5fba02..f5e4459 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -42,7 +42,7 @@ if ($_GET['option']) {
if($curcat == "system") {
$curoption = "processor";
} else if($curcat == "queues") {
- $curoption = "queues.";
+ $curoption = "queues";
} else {
$curoption = "wan";
}
@@ -120,7 +120,7 @@ include("head.inc");
<?php
foreach ($databases as $db => $database) {
- if(! stristr($database, $curcat)) {
+ if(! preg_match("/($curcat)/i", $database)) {
continue;
}
$optionc = split("-", $database);
@@ -134,7 +134,7 @@ include("head.inc");
break;
case "queues":
$optionc = str_replace($search, $replace, $optionc[1]);
- echo "<option value=\"$optionc.\"";
+ echo "<option value=\"$optionc\"";
$prettyprint = ucwords(str_replace($search, $replace, $optionc));
break;
default:
@@ -174,7 +174,7 @@ include("head.inc");
foreach($periods as $period => $interval) {
/* check which databases are valid for our category */
foreach($databases as $curdatabase) {
- if(! stristr($curdatabase, $curcat)) {
+ if(! preg_match("/($curcat)/i", $curdatabase)) {
continue;
}
$optionc = split("-", $curdatabase);
@@ -190,7 +190,7 @@ include("head.inc");
if($monitorip == "") {
continue 2;
}
- if(! stristr($curdatabase, $optionc)) {
+ if(! preg_match("/($optionc)[-.]/i", $curdatabase)) {
continue 2;
}
break;
@@ -202,7 +202,7 @@ include("head.inc");
break;
default:
/* just use the name here */
- if(! stristr($curdatabase, $curoption)) {
+ if(! preg_match("/($curoption)[-.]/i", $curdatabase)) {
continue 2;
}
}
OpenPOWER on IntegriCloud