aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-stable
diff options
context:
space:
mode:
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";