From 1f4adc3ec56325e0fa70496ab509440c638c994c Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Thu, 19 May 2005 03:03:47 +0000 Subject: Changes to config versioning. --- etc/inc/config.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 5ce2a19..ba12705 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -568,9 +568,8 @@ function write_config($desc="Unknown", $backup = true) { conf_mount_ro(); config_unlock(); - $config = parse_config(true); - //generate_config_cache($config); - //cleanup_backupcache(); + generate_config_cache($config); + cleanup_backupcache(); return $config; } @@ -603,7 +602,7 @@ function reset_factory_defaults() { function config_restore($conffile) { global $config, $g; - + if (!file_exists($conffile)) return 1; @@ -611,9 +610,9 @@ function config_restore($conffile) { conf_mount_rw(); backup_config(); - copy($conffile, "{$g['conf_path']}/config.xml"); + copy($conffile, "{$g['cf_conf_path']}/config.xml"); + $config = parse_config(true); write_config("Reverted to " . array_pop(explode("/", $conffile)) . ".", false); - $config = parse_config(true); conf_mount_ro(); config_unlock(); -- cgit v1.1