summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/system_gateways_edit.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 1ccd2d5..3fc140d 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -121,10 +121,20 @@ if ($_POST) {
$gateway['interface'] = $_POST['interface'];
$gateway['name'] = $_POST['name'];
$gateway['gateway'] = $_POST['gateway'];
- $gateway['defaultgw'] = $_POST['defaultgw'];
$gateway['monitor'] = $_POST['monitor'];
$gateway['descr'] = $_POST['descr'];
+ if($_POST['defaultgw'] == "yes") {
+ $i = 0;
+ foreach($a_gateways as $gw) {
+ unset($config['gateways'][$i]['defaultgw']);
+ $i++;
+ }
+ $gateway['defaultgw'] = true;
+ } else {
+ unset($gateway['defaultgw']);
+ }
+
if (isset($id) && $a_gateways[$id])
$a_gateways[$id] = $gateway;
else
OpenPOWER on IntegriCloud