diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-27 20:56:22 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-27 20:56:22 +0000 |
commit | 7247e494abe084aca3cda49816e1a9236443bbed (patch) | |
tree | 3a8af3bc83e2a8757ede59dfcda046cb37be02ca /usr | |
parent | 6f77534b42253df754ccb8a36ad114ac4f5313c6 (diff) | |
download | pfsense-7247e494abe084aca3cda49816e1a9236443bbed.zip pfsense-7247e494abe084aca3cda49816e1a9236443bbed.tar.gz |
update to use new updatechanged() function
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/interfaces_lan.php | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php index e7e846a..ea28306 100755 --- a/usr/local/www/interfaces_lan.php +++ b/usr/local/www/interfaces_lan.php @@ -73,33 +73,21 @@ if ($_POST) { if (!$input_errors) { if (($lancfg['ipaddr'] != $_POST['ipaddr']) || ($lancfg['subnet'] != $_POST['subnet'])) { - if (($pconfig['ipaddr'] != $_POST['ipaddr'])) { - $changedesc .= " IP changed from {$lancfg['ipaddr']} to {$_POST['ipaddr']}"; - $lancfg['ipaddr'] = $_POST['ipaddr']; - } - if (($lancfg['subnet'] != $_POST['subnet'])) { - $changedesc .= " subnet changed from {$lancfg['subnet']} to {$_POST['subnet']}"; - $lancfg['subnet'] = $_POST['subnet']; - } + updatechanged("IP Address", &$lancfg['ipaddr'], $_POST['ipaddr']); + updatechanged("subnet", &$lancfg['subnet'], $_POST['subnet']); /* We'll need to reboot after this */ touch($d_sysrebootreqd_path); } - if ($lancfg['bandwidth'] != $_POST['bandwidth']) { - $changedesc .= " bandwidth changed from {$lancfg['bandwidth']} to {$_POST['bandwidth']}"; - $lancfg['bandwidth'] = $_POST['bandwidth']; - } - if ($lancfg['bandwidthtype'] != $_POST['bandwidthtype']) { - $changedesc .= " bandwidth type changed from {$lancfg['bandwidthtype']} to {$_POST['bandwidth']}"; - $lancfg['bandwidthtype'] = $_POST['bandwidthtype']; - } + updatechanged("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']); + updatechanged("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']); $dhcpd_was_enabled = 0; if (isset($config['dhcpd']['enable'])) { unset($config['dhcpd']['enable']); $dhcpd_was_enabled = 1; - $changedesc .= " DHCP was disabled"; + $changedesc .= " DHCP disabled"; } write_config($changedesc); |