From ff1bf1c26f491b8cd10f1c47c0c491eeda29b0f6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 17 Nov 2009 20:38:39 -0500 Subject: Save and restore correctly --- config/haproxy/haproxy_global.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'config/haproxy') diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php index 5b00b644..609c4b4e 100755 --- a/config/haproxy/haproxy_global.php +++ b/config/haproxy/haproxy_global.php @@ -38,13 +38,6 @@ $d_haproxyconfdirty_path = $g['varrun_path'] . "/haproxy.conf.dirty"; if (!is_array($config['installedpackages']['haproxy'])) $config['installedpackages']['haproxy'] = array(); -$pconfig['enable'] = isset($config['installedpackages']['haproxy']['enable']); -$pconfig['maxconn'] = $config['installedpackages']['haproxy']['maxconn']; -$pconfig['enablesync'] = isset($config['installedpackages']['haproxy']['enablesync']); -$pconfig['syncpassword'] = $config['installedpackages']['haproxy']['syncpassword']; -$pconfig['synchost1'] = $config['installedpackages']['haproxy']['synchost1']; -$pconfig['synchost2'] = $config['installedpackages']['haproxy']['synchost2']; -$pconfig['synchost3'] = $config['installedpackages']['haproxy']['synchost3']; if ($_POST) { unset($input_errors); @@ -82,6 +75,7 @@ if ($_POST) { $config['installedpackages']['haproxy']['synchost1'] = $_POST['synchost1'] ? $_POST['synchost1'] : false; $config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost2'] ? $_POST['synchost2'] : false; $config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost3'] ? $_POST['synchost3'] : false; + $config['installedpackages']['haproxy']['syncpassword'] = $_POST['syncpassword'] ? $_POST['syncpassword'] : false; touch($d_haproxyconfdirty_path); write_config(); } @@ -89,6 +83,14 @@ if ($_POST) { } +$pconfig['enable'] = isset($config['installedpackages']['haproxy']['enable']); +$pconfig['maxconn'] = $config['installedpackages']['haproxy']['maxconn']; +$pconfig['enablesync'] = isset($config['installedpackages']['haproxy']['enablesync']); +$pconfig['syncpassword'] = $config['installedpackages']['haproxy']['syncpassword']; +$pconfig['synchost1'] = $config['installedpackages']['haproxy']['synchost1']; +$pconfig['synchost2'] = $config['installedpackages']['haproxy']['synchost2']; +$pconfig['synchost3'] = $config['installedpackages']['haproxy']['synchost3']; + $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); if(strstr($pfSversion, "1.2")) $one_two = true; @@ -212,7 +214,7 @@ function enable_change(enable_change) { Sync host #1 - +
Synchronize settings to this hosts IP address. @@ -220,7 +222,7 @@ function enable_change(enable_change) { Sync host #2 - +
Synchronize settings to this hosts IP address. @@ -228,7 +230,7 @@ function enable_change(enable_change) { Sync host #3 - +
Synchronize settings to this hosts IP address. -- cgit v1.2.3