diff options
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/interfaces.php | 9 | ||||
-rwxr-xr-x | usr/local/www/interfaces_lan.php | 9 | ||||
-rwxr-xr-x | usr/local/www/interfaces_opt.php | 9 | ||||
-rwxr-xr-x | usr/local/www/interfaces_wan.php | 9 |
4 files changed, 28 insertions, 8 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 0b5ddd6..303b96e 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -233,8 +233,13 @@ if ($_POST) { $config['bigpond']['minheartbeatinterval'] = $_POST['bigpond_minheartbeatinterval']; } - $wancfg['bandwidth'] = $_POST['bandwidth']; - $wancfg['bandwidthtype'] = $_POST['bandwidthtype']; + if($_POST['bandwidth'] <> "" and $_POST['bandwidthtype'] <> "") { + $wancfg['bandwidth'] = $_POST['bandwidth']; + $wancfg['bandwidthtype'] = $_POST['bandwidthtype']; + } else { + unset($wancfg['bandwidth']); + unset($wancfg['bandwidthtype']); + } $wancfg['blockpriv'] = $_POST['blockpriv'] ? true : false; $wancfg['blockbogons'] = $_POST['blockbogons'] ? true : false; diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php index ec510c7..35b43b5 100755 --- a/usr/local/www/interfaces_lan.php +++ b/usr/local/www/interfaces_lan.php @@ -81,8 +81,13 @@ if ($_POST) { touch($d_sysrebootreqd_path); } - update_if_changed("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']); - update_if_changed("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']); + if($_POST['bandwidth'] <> "" and $_POST['bandwidthtype'] <> "") { + update_if_changed("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']); + update_if_changed("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']); + } else { + unset($lancfg['bandwidth']); + unset($lancfg['bandwidthtype']); + } $dhcpd_was_enabled = 0; if (isset($config['dhcpd']['enable'])) { diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php index 9c4e56b..7e9ce75 100755 --- a/usr/local/www/interfaces_opt.php +++ b/usr/local/www/interfaces_opt.php @@ -128,8 +128,13 @@ if ($_POST) { $optcfg['subnet'] = $_POST['subnet']; $optcfg['bridge'] = $_POST['bridge']; $optcfg['enable'] = $_POST['enable'] ? true : false; - $optcfg['bandwidth'] = $_POST['bandwidth']; - $optcfg['bandwidthtype'] = $_POST['bandwidthtype']; + if($_POST['bandwidth'] <> "" and $_POST['bandwidthtype'] <> "") { + $optcfg['bandwidth'] = $_POST['bandwidth']; + $optcfg['bandwidthtype'] = $_POST['bandwidthtype']; + } else { + unset($optcfg['bandwidth']); + unset($optcfg['bandwidthtype']); + } $optcfg['gateway'] = $_POST['gateway']; write_config(); diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php index 0b5ddd6..303b96e 100755 --- a/usr/local/www/interfaces_wan.php +++ b/usr/local/www/interfaces_wan.php @@ -233,8 +233,13 @@ if ($_POST) { $config['bigpond']['minheartbeatinterval'] = $_POST['bigpond_minheartbeatinterval']; } - $wancfg['bandwidth'] = $_POST['bandwidth']; - $wancfg['bandwidthtype'] = $_POST['bandwidthtype']; + if($_POST['bandwidth'] <> "" and $_POST['bandwidthtype'] <> "") { + $wancfg['bandwidth'] = $_POST['bandwidth']; + $wancfg['bandwidthtype'] = $_POST['bandwidthtype']; + } else { + unset($wancfg['bandwidth']); + unset($wancfg['bandwidthtype']); + } $wancfg['blockpriv'] = $_POST['blockpriv'] ? true : false; $wancfg['blockbogons'] = $_POST['blockbogons'] ? true : false; |