From 0fea430100e63268f0dc313061a713fe114c7c59 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 10 Apr 2014 16:31:57 -0400 Subject: Fix a whole bunch of invalid version tests. --- config/vnstat2/www/diag_vnstat.php | 4 ++-- config/vnstat2/www/diag_vnstat2.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'config/vnstat2') 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");
{$pgtitle}

"; echo "Go Back
"; 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
{$pgtitle}

"; echo "Go Back
"; if($savemsg) { -- cgit v1.2.3