aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy
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/haproxy
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/haproxy')
-rwxr-xr-xconfig/haproxy/haproxy_global.php4
-rwxr-xr-xconfig/haproxy/haproxy_listeners.php4
-rwxr-xr-xconfig/haproxy/haproxy_listeners_edit.php4
-rwxr-xr-xconfig/haproxy/haproxy_pool_edit.php4
-rwxr-xr-xconfig/haproxy/haproxy_pools.php4
5 files changed, 10 insertions, 10 deletions
diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php
index b632c7cc..16f5152d 100755
--- a/config/haproxy/haproxy_global.php
+++ b/config/haproxy/haproxy_global.php
@@ -120,8 +120,8 @@ if (!$pconfig['logfacility'])
if (!$pconfig['loglevel'])
$pconfig['loglevel'] = 'info';
-$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
-if(strstr($pfSversion, "1.2"))
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version < 2.0)
$one_two = true;
$pgtitle = "Services: HAProxy: Settings";
diff --git a/config/haproxy/haproxy_listeners.php b/config/haproxy/haproxy_listeners.php
index e1508d95..a5bc9a22 100755
--- a/config/haproxy/haproxy_listeners.php
+++ b/config/haproxy/haproxy_listeners.php
@@ -65,8 +65,8 @@ if ($_GET['act'] == "del") {
}
}
-$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
-if(strstr($pfSversion, "1.2"))
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version < 2.0)
$one_two = true;
$pgtitle = "Services: HAProxy: Listener";
diff --git a/config/haproxy/haproxy_listeners_edit.php b/config/haproxy/haproxy_listeners_edit.php
index 7ebbc701..2b71c7ea 100755
--- a/config/haproxy/haproxy_listeners_edit.php
+++ b/config/haproxy/haproxy_listeners_edit.php
@@ -241,8 +241,8 @@ if ($_POST) {
}
}
-$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
-if(strstr($pfSversion, "1.2"))
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version < 2.0)
$one_two = true;
$pgtitle = "HAProxy: Listener: Edit";
diff --git a/config/haproxy/haproxy_pool_edit.php b/config/haproxy/haproxy_pool_edit.php
index 4f2b5902..4da508f2 100755
--- a/config/haproxy/haproxy_pool_edit.php
+++ b/config/haproxy/haproxy_pool_edit.php
@@ -171,8 +171,8 @@ if ($_POST) {
$pconfig['a_servers']=&$a_pools[$id]['ha_servers']['item'];
}
-$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
-if(strstr($pfSversion, "1.2"))
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version < 2.0)
$one_two = true;
$pgtitle = "HAProxy: pool: Edit";
diff --git a/config/haproxy/haproxy_pools.php b/config/haproxy/haproxy_pools.php
index 6c2146a0..a0bf75a2 100755
--- a/config/haproxy/haproxy_pools.php
+++ b/config/haproxy/haproxy_pools.php
@@ -67,8 +67,8 @@ if ($_GET['act'] == "del") {
exit;
}
-$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
-if(strstr($pfSversion, "1.2"))
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version < 2.0)
$one_two = true;
$pgtitle = "Services: HAProxy: Server pools";