aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-stable
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-stable
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-stable')
-rwxr-xr-xconfig/haproxy-stable/haproxy_global.php4
-rwxr-xr-xconfig/haproxy-stable/haproxy_listeners.php4
-rwxr-xr-xconfig/haproxy-stable/haproxy_listeners_edit.php4
-rwxr-xr-xconfig/haproxy-stable/haproxy_pool_edit.php4
-rwxr-xr-xconfig/haproxy-stable/haproxy_pools.php4
5 files changed, 10 insertions, 10 deletions
diff --git a/config/haproxy-stable/haproxy_global.php b/config/haproxy-stable/haproxy_global.php
index fa58f9a2..c8b05d52 100755
--- a/config/haproxy-stable/haproxy_global.php
+++ b/config/haproxy-stable/haproxy_global.php
@@ -107,8 +107,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-stable/haproxy_listeners.php b/config/haproxy-stable/haproxy_listeners.php
index b34b2590..8c6125f0 100755
--- a/config/haproxy-stable/haproxy_listeners.php
+++ b/config/haproxy-stable/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-stable/haproxy_listeners_edit.php b/config/haproxy-stable/haproxy_listeners_edit.php
index f2b244df..e9c6187c 100755
--- a/config/haproxy-stable/haproxy_listeners_edit.php
+++ b/config/haproxy-stable/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-stable/haproxy_pool_edit.php b/config/haproxy-stable/haproxy_pool_edit.php
index 6ca730e9..1e9958eb 100755
--- a/config/haproxy-stable/haproxy_pool_edit.php
+++ b/config/haproxy-stable/haproxy_pool_edit.php
@@ -173,8 +173,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-stable/haproxy_pools.php b/config/haproxy-stable/haproxy_pools.php
index c3bc30b1..0edc2ad8 100755
--- a/config/haproxy-stable/haproxy_pools.php
+++ b/config/haproxy-stable/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";