diff options
author | thompsa <andy@fud.org.nz> | 2010-02-08 00:02:31 +1300 |
---|---|---|
committer | thompsa <andy@fud.org.nz> | 2010-02-08 00:21:14 +1300 |
commit | cacd273abbf3c0100f94bd59a6018593744c7b2c (patch) | |
tree | bd233b0355ad3c6750c9816194d1ca368a3a4ba6 /config/haproxy-dev/haproxy_listeners_edit.php | |
parent | 51f497343aaff857e82115a27db9010435a43105 (diff) | |
download | pfsense-packages-cacd273abbf3c0100f94bd59a6018593744c7b2c.tar.gz pfsense-packages-cacd273abbf3c0100f94bd59a6018593744c7b2c.tar.bz2 pfsense-packages-cacd273abbf3c0100f94bd59a6018593744c7b2c.zip |
Update the listener if the pool name changes.
Diffstat (limited to 'config/haproxy-dev/haproxy_listeners_edit.php')
-rwxr-xr-x | config/haproxy-dev/haproxy_listeners_edit.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/config/haproxy-dev/haproxy_listeners_edit.php b/config/haproxy-dev/haproxy_listeners_edit.php index 91635260..67218022 100755 --- a/config/haproxy-dev/haproxy_listeners_edit.php +++ b/config/haproxy-dev/haproxy_listeners_edit.php @@ -190,43 +190,6 @@ if ($_POST) { if($backend['name'] != "") $changedesc .= " modified '{$backend['name']}' pool:"; - if ($backend['name']!=$_POST['name']) { - // name changed: - // * update servers - // * update frontend (default backend and acl) - if (!is_array($config['installedpackages']['haproxy']['ha_servers']['item'])) { - $config['installedpackages']['haproxy']['ha_servers']['item'] = array(); - } - $a_server = &$config['installedpackages']['haproxy']['ha_servers']['item']; - - for ( $i = 0; $i < count($a_server); $i++) { - if ($a_server[$i]['backend']==$backend['name']) { - $a_server[$i]['backend']=$_POST['name']; - } - } - - if (!is_array($config['installedpackages']['haproxy']['ha_frontends']['item'])) { - $config['installedpackages']['haproxy']['ha_frontends']['item'] = array(); - } - $a_frontend = &$config['installedpackages']['haproxy']['ha_frontends']['item']; - - for ( $i = 0; $i < count($a_frontend); $i++) { - if ($a_frontend[$i]['backend']==$backend['name']) { - $a_frontend[$i]['backend']=$_POST['name']; - } - - if (!is_array($a_frontend[$i]['ha_acls']['item'])) { - $a_frontend[$i]['ha_acls']['item'] = array(); - } - - $a_acl = &$a_frontend[$i]['ha_acls']['item']; - for ( $j = 0; $j < count($a_acl); $j++) { - if ($a_acl[$j]['backend']==$backend['name']) { - $a_acl[$j]['backend']=$_POST['name']; - } - } - } - } update_if_changed("name", $backend['name'], $_POST['name']); update_if_changed("description", $backend['desc'], $_POST['desc']); |