summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-03-27 22:07:16 +0000
committerBill Marquette <billm@pfsense.org>2005-03-27 22:07:16 +0000
commitd345bd395e141db53bcf5ebe7d2cf9fb4176f0f7 (patch)
tree82bd2b34c87209628412651c58dd5a41ae36d79b
parente9d2ee4487fc8e5574d1580c827b8f6fd64dfdd8 (diff)
downloadpfsense-d345bd395e141db53bcf5ebe7d2cf9fb4176f0f7.zip
pfsense-d345bd395e141db53bcf5ebe7d2cf9fb4176f0f7.tar.gz
Create update_changedesc() function
Add $Header$ CVS tag
-rwxr-xr-xusr/local/www/guiconfig.inc16
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;
}
OpenPOWER on IntegriCloud