summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-03-27 20:17:58 +0000
committerBill Marquette <billm@pfsense.org>2005-03-27 20:17:58 +0000
commit4d762703bcecf23852f071317739af102664f1c6 (patch)
tree92a3e16ca626b71e93f93c99e7d02dbce737cf80
parent417c60420f73b84cc6ffec7400d1242965d637c2 (diff)
downloadpfsense-4d762703bcecf23852f071317739af102664f1c6.zip
pfsense-4d762703bcecf23852f071317739af102664f1c6.tar.gz
updatechanged function - only update if changed and log what changed
-rwxr-xr-xusr/local/www/guiconfig.inc15
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;
+ }
+}
+
+
?>
OpenPOWER on IntegriCloud