diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-27 20:17:58 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-27 20:17:58 +0000 |
commit | 4d762703bcecf23852f071317739af102664f1c6 (patch) | |
tree | 92a3e16ca626b71e93f93c99e7d02dbce737cf80 | |
parent | 417c60420f73b84cc6ffec7400d1242965d637c2 (diff) | |
download | pfsense-4d762703bcecf23852f071317739af102664f1c6.zip pfsense-4d762703bcecf23852f071317739af102664f1c6.tar.gz |
updatechanged function - only update if changed and log what changed
-rwxr-xr-x | usr/local/www/guiconfig.inc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 40d630b..4c049d2 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -442,4 +442,19 @@ function gentitle($pgname) { return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname; } +/* Check if variable has changed, update and log if it has + * varname = variable name in plain text + * orig = original value + * new = new value + */ +function updatechanged($varname, $orig, $new) { + global $changedesc; + + if ($orig != $new) { + $changedesc .= " {$varname}: \"{$orig}\" -> \"{$new}\""; + $orig = $new; + } +} + + ?> |