diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-27 22:07:16 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-27 22:07:16 +0000 |
commit | d345bd395e141db53bcf5ebe7d2cf9fb4176f0f7 (patch) | |
tree | 82bd2b34c87209628412651c58dd5a41ae36d79b | |
parent | e9d2ee4487fc8e5574d1580c827b8f6fd64dfdd8 (diff) | |
download | pfsense-d345bd395e141db53bcf5ebe7d2cf9fb4176f0f7.zip pfsense-d345bd395e141db53bcf5ebe7d2cf9fb4176f0f7.tar.gz |
Create update_changedesc() function
Add $Header$ CVS tag
-rwxr-xr-x | usr/local/www/guiconfig.inc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index e3c6cea..7b57fd2 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -1,4 +1,5 @@ <?php +/* $Header$ */ /* guiconfig.inc by Scott Ullrich, Copyright 2004, All rights reserved. @@ -442,6 +443,15 @@ function gentitle($pgname) { return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname; } +/* update the changedesc and changecount(er) variables */ +function update_changedesc($update) { + global $changedesc; + global $changecount; + + $changedesc .= " {$update}"; + $changecount++; +} + /* Check if variable has changed, update and log if it has * returns true if var changed * varname = variable name in plain text @@ -449,12 +459,8 @@ function gentitle($pgname) { * new = new value */ function update_if_changed($varname, $orig, $new) { - global $changedesc; - global $changecount; - if ($orig != $new) { - $changedesc .= " {$varname}: \"{$orig}\" -> \"{$new}\""; - $changecount++; + update_changedesc("{$varname}: \"{$orig}\" -> \"{$new}\""); $orig = $new; return true; } |