From 8059f9cb77e7b8bafbae6416deb7e745bd28fd99 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 22 Nov 2011 11:29:24 -0500 Subject: Add version to backup.cache in one more place --- etc/inc/config.lib.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index 8779068..c54c854 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -833,13 +833,16 @@ function backup_config() { } else { $bakdesc = $config['revision']['description']; } + + $bakver = ($config['version'] == "") ? "?" : $config['version']; + copy($g['cf_conf_path'] . '/config.xml', $g['cf_conf_path'] . '/backup/config-' . $baktime . '.xml'); if(file_exists($g['cf_conf_path'] . '/backup/backup.cache')) { $backupcache = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); } else { $backupcache = array(); } - $backupcache[$baktime] = array('description' => $bakdesc); + $backupcache[$baktime] = array('description' => $bakdesc, 'version' => $bakver); $bakout = fopen($g['cf_conf_path'] . '/backup/backup.cache', "w"); fwrite($bakout, serialize($backupcache)); fclose($bakout); -- cgit v1.1