diff options
author | Bill Marquette <billm@pfsense.org> | 2005-04-03 15:34:04 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-04-03 15:34:04 +0000 |
commit | 9eab73da1b61c344b094dfe14110cf567370df2c (patch) | |
tree | 5972e8169663c69d74484efc9d456c02b2d5a6ed | |
parent | a21ff5bd9889abe7823d46fc5e1ab0be37925893 (diff) | |
download | pfsense-9eab73da1b61c344b094dfe14110cf567370df2c.zip pfsense-9eab73da1b61c344b094dfe14110cf567370df2c.tar.gz |
Let the update_if_changed() force passing as reference instead of relying on our memory and testing abilities
-rwxr-xr-x | usr/local/www/guiconfig.inc | 2 | ||||
-rwxr-xr-x | usr/local/www/system.php | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 41b39b7..5a218f9 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -458,7 +458,7 @@ function update_changedesc($update) { * orig = original value * new = new value */ -function update_if_changed($varname, $orig, $new) { +function update_if_changed($varname, & $orig, $new) { if ($orig != $new) { update_changedesc("{$varname}: \"{$orig}\" -> \"{$new}\""); $orig = $new; diff --git a/usr/local/www/system.php b/usr/local/www/system.php index 29eabb1..bebed65 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -107,16 +107,16 @@ if ($_POST) { } if (!$input_errors) { - 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']); + 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']); - if (update_if_changed("webgui protocol", &$config['system']['webgui']['protocol'], $pconfig['webguiproto']) || update_if_changed("webgui port", &$config['system']['webgui']['port'], $pconfig['webguiport'])) + if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $pconfig['webguiproto']) || update_if_changed("webgui port", $config['system']['webgui']['port'], $pconfig['webguiport'])) $restart_webgui = true; - 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']); + 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']); |