diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-27 20:58:09 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-27 20:58:09 +0000 |
commit | 79f8694f55ea39295ba649945b3557cbe16de1fc (patch) | |
tree | ac362a7a97360bb81d896c86eebf9feea1cf22f9 | |
parent | 7247e494abe084aca3cda49816e1a9236443bbed (diff) | |
download | pfsense-79f8694f55ea39295ba649945b3557cbe16de1fc.zip pfsense-79f8694f55ea39295ba649945b3557cbe16de1fc.tar.gz |
better function name :)
-rwxr-xr-x | usr/local/www/guiconfig.inc | 2 | ||||
-rwxr-xr-x | usr/local/www/interfaces_lan.php | 8 | ||||
-rwxr-xr-x | usr/local/www/system.php | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 9105819..407332c 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -448,7 +448,7 @@ function gentitle($pgname) { * orig = original value * new = new value */ -function updatechanged($varname, $orig, $new) { +function update_if_changed($varname, $orig, $new) { global $changedesc; if ($orig != $new) { diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php index ea28306..1ef3132 100755 --- a/usr/local/www/interfaces_lan.php +++ b/usr/local/www/interfaces_lan.php @@ -73,15 +73,15 @@ if ($_POST) { if (!$input_errors) { if (($lancfg['ipaddr'] != $_POST['ipaddr']) || ($lancfg['subnet'] != $_POST['subnet'])) { - updatechanged("IP Address", &$lancfg['ipaddr'], $_POST['ipaddr']); - updatechanged("subnet", &$lancfg['subnet'], $_POST['subnet']); + update_if_changed("IP Address", &$lancfg['ipaddr'], $_POST['ipaddr']); + update_if_changed("subnet", &$lancfg['subnet'], $_POST['subnet']); /* We'll need to reboot after this */ touch($d_sysrebootreqd_path); } - updatechanged("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']); - updatechanged("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']); + update_if_changed("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']); + update_if_changed("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']); $dhcpd_was_enabled = 0; if (isset($config['dhcpd']['enable'])) { diff --git a/usr/local/www/system.php b/usr/local/www/system.php index d3e9eb4..600c9e0 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -105,15 +105,15 @@ if ($_POST) { } if (!$input_errors) { - updatechanged("hostname", &$config['system']['hostname'], strtolower($_POST['hostname'])); - updatechanged("domain", &$config['system']['domain'], strtolower($_POST['domain'])); - updatechanged("username", &$config['system']['username'], $_POST['username']); + update_if_changed("hostname", &$config['system']['hostname'], strtolower($_POST['hostname'])); + update_if_changed("domain", &$config['system']['domain'], strtolower($_POST['domain'])); + update_if_changed("username", &$config['system']['username'], $_POST['username']); - $restart_webgui = updatechanged("webgui protocol", &$config['system']['webgui']['protocol'], $pconfig['webguiproto']); - $restart_webgui = updatechanged("webgui port", &$config['system']['webgui']['port'], $pconfig['webguiport']); - updatechanged("timezone", &$config['system']['timezone'], $_POST['timezone']); - updatechanged("NTP servers", &$config['system']['timeservers'], strtolower($_POST['timeservers'])); - updatechanged("NTP update interval", &$config['system']['time-update-interval'], $_POST['timeupdateinterval']); + $restart_webgui = update_if_changed("webgui protocol", &$config['system']['webgui']['protocol'], $pconfig['webguiproto']); + $restart_webgui = update_if_changed("webgui port", &$config['system']['webgui']['port'], $pconfig['webguiport']); + update_if_changed("timezone", &$config['system']['timezone'], $_POST['timezone']); + update_if_changed("NTP servers", &$config['system']['timeservers'], strtolower($_POST['timeservers'])); + update_if_changed("NTP update interval", &$config['system']['time-update-interval'], $_POST['timeupdateinterval']); /* XXX - billm: these still need updating after figuring out how to check if they actually changed */ unset($config['system']['dnsserver']); |