diff options
Diffstat (limited to 'config/haproxy')
-rwxr-xr-x | config/haproxy/haproxy_global.php | 4 | ||||
-rwxr-xr-x | config/haproxy/haproxy_listeners.php | 4 | ||||
-rwxr-xr-x | config/haproxy/haproxy_listeners_edit.php | 4 | ||||
-rwxr-xr-x | config/haproxy/haproxy_pool_edit.php | 4 | ||||
-rwxr-xr-x | config/haproxy/haproxy_pools.php | 4 |
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"; |