aboutsummaryrefslogtreecommitdiffstats
path: root/config/vnstat2/www
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-04-10 16:31:57 -0400
committerjim-p <jimp@pfsense.org>2014-04-10 16:31:57 -0400
commit0fea430100e63268f0dc313061a713fe114c7c59 (patch)
tree195c25cd40e51f4256865af3917f84f2a1a7c9bf /config/vnstat2/www
parent8869c3d78abf2bf7e72fe079ed457c28f3f8edab (diff)
downloadpfsense-packages-0fea430100e63268f0dc313061a713fe114c7c59.tar.gz
pfsense-packages-0fea430100e63268f0dc313061a713fe114c7c59.tar.bz2
pfsense-packages-0fea430100e63268f0dc313061a713fe114c7c59.zip
Fix a whole bunch of invalid version tests.
Diffstat (limited to 'config/vnstat2/www')
-rw-r--r--config/vnstat2/www/diag_vnstat.php4
-rw-r--r--config/vnstat2/www/diag_vnstat2.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/config/vnstat2/www/diag_vnstat.php b/config/vnstat2/www/diag_vnstat.php
index afef3849..04e03911 100644
--- a/config/vnstat2/www/diag_vnstat.php
+++ b/config/vnstat2/www/diag_vnstat.php
@@ -41,7 +41,7 @@
require("guiconfig.inc");
-$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
$pgtitle = gettext("Vnstat2 summary ");
if($_REQUEST['getactivity']) {
@@ -77,7 +77,7 @@ include("head.inc");
<div id='maincontent'>
<?php
include("fbegin.inc");
- if(strstr($pfSversion, "1.2"))
+ if ($pf_version < 2.0)
echo "<p class=\"pgtitle\">{$pgtitle}</p>";
echo "<a href=$myurl/pkg_edit.php?xml=vnstatoutput.xml&id=0>Go Back</a><br />";
if($savemsg) {
diff --git a/config/vnstat2/www/diag_vnstat2.php b/config/vnstat2/www/diag_vnstat2.php
index ec19a0b2..e5ce1de5 100644
--- a/config/vnstat2/www/diag_vnstat2.php
+++ b/config/vnstat2/www/diag_vnstat2.php
@@ -43,7 +43,7 @@ global $config;
$aaaa = $config['installedpackages']['vnstat2']['config'][0]['vnstat_interface2'];
$bbbb = convert_real_interface_to_friendly_descr($aaaa);
-$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
$pgtitle = gettext("Vnstat2 info for $bbbb ($aaaa)");
if($_REQUEST['getactivity']) {
@@ -87,7 +87,7 @@ else
<div id='maincontent'>
<?php
include("fbegin.inc");
- if(strstr($pfSversion, "1.2"))
+ if ($pf_version < 2.0)
echo "<p class=\"pgtitle\">{$pgtitle}</p>";
echo "<a href=$myurl/pkg_edit.php?xml=vnstatoutput.xml&id=0>Go Back</a><br />";
if($savemsg) {