diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/haproxy-devel/haproxy_listeners_edit.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/haproxy-devel/haproxy_listeners_edit.php b/config/haproxy-devel/haproxy_listeners_edit.php index 8f9c2484..dc418614 100644 --- a/config/haproxy-devel/haproxy_listeners_edit.php +++ b/config/haproxy-devel/haproxy_listeners_edit.php @@ -229,6 +229,15 @@ if ($_POST) { if($backend['name'] != "") $changedesc .= " modified '{$backend['name']}' pool:"; + + // update references to this primary frontend + if ($backend['name'] != $_POST['name']) { + foreach($a_backend as &$frontend) { + if ($frontend['primary_frontend'] == $backend['name']) { + $frontend['primary_frontend'] = $_POST['name']; + } + } + } foreach($simplefields as $stat) update_if_changed($stat, $backend[$stat], $_POST[$stat]); |