From 001fdeea72bf513b38cf3b03bc79c47ba1699f0a Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 25 May 2005 21:57:44 +0000 Subject: * Do not set bandwidth and bandwidth type unless are other than "" * Unset the values if either condition is not met in the config --- usr/local/www/interfaces_lan.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr/local/www/interfaces_lan.php') 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'])) { -- cgit v1.1