diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-05-25 21:57:44 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-05-25 21:57:44 +0000 |
commit | 001fdeea72bf513b38cf3b03bc79c47ba1699f0a (patch) | |
tree | 0416bdc2f2b6e6287518cd43c6dac1613ac005dc /usr/local/www/interfaces_lan.php | |
parent | 224ed6e22283c50ab1be0ab0be04d81316a88af9 (diff) | |
download | pfsense-001fdeea72bf513b38cf3b03bc79c47ba1699f0a.zip pfsense-001fdeea72bf513b38cf3b03bc79c47ba1699f0a.tar.gz |
* Do not set bandwidth and bandwidth type unless are other than ""
* Unset the values if either condition is not met in the config
Diffstat (limited to 'usr/local/www/interfaces_lan.php')
-rwxr-xr-x | usr/local/www/interfaces_lan.php | 9 |
1 files changed, 7 insertions, 2 deletions
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'])) { |