From 417c60420f73b84cc6ffec7400d1242965d637c2 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Sun, 27 Mar 2005 19:32:08 +0000 Subject: Commit description work done so far --- usr/local/www/system.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/system.php b/usr/local/www/system.php index b30f207..185313b 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -53,6 +53,8 @@ if (!$pconfig['timezone']) if (!$pconfig['timeservers']) $pconfig['timeservers'] = "pool.ntp.org"; +$changedesc = "System: "; + function is_timezone($elt) { return !preg_match("/\/$/", $elt); } @@ -103,8 +105,14 @@ if ($_POST) { } if (!$input_errors) { - $config['system']['hostname'] = strtolower($_POST['hostname']); - $config['system']['domain'] = strtolower($_POST['domain']); + if ($config['system']['hostname'] != strtolower($_POST['hostname'])) { + $changedesc .= " changed hostname: \"{$config['system']['hostname']}\" -> \"" . strtolower($_POST['hostname']) . "\""; + $config['system']['hostname'] = strtolower($_POST['hostname']); + } + if ($config['system']['domain'] != strtolower($_POST['domain'])) { + $changedesc .= " changed domain: \"{$config['system']['domain']}\" -> \"" . strtolower($_POST['domain']) . "\""; + $config['system']['domain'] = strtolower($_POST['domain']); + } $oldwebguiproto = $config['system']['webgui']['protocol']; $config['system']['username'] = $_POST['username']; $config['system']['webgui']['protocol'] = $pconfig['webguiproto']; @@ -132,7 +140,7 @@ if ($_POST) { pclose($fd); } - write_config(); + write_config($changedesc); // restart webgui if proto or port changed if (($oldwebguiproto != $config['system']['webgui']['protocol']) || -- cgit v1.1