diff options
author | jim-p <jimp@pfsense.org> | 2011-11-21 17:09:53 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-11-22 11:55:42 -0500 |
commit | 92420c0a5b4ca34a6c087381635626bfb04f9b55 (patch) | |
tree | 40be0289b4d47325b0abda489f82160be7239e51 /etc/inc/config.lib.inc | |
parent | 5e555f9e7159816cb31a9af95c436bb7dec81e3d (diff) | |
download | pfsense-92420c0a5b4ca34a6c087381635626bfb04f9b55.zip pfsense-92420c0a5b4ca34a6c087381635626bfb04f9b55.tar.gz |
Also show the config version in the backup history.
Diffstat (limited to 'etc/inc/config.lib.inc')
-rw-r--r-- | etc/inc/config.lib.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index f08cff8..8779068 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -760,7 +760,9 @@ function cleanup_backupcache($revisions = 30, $lock = false) { } if($newxml['revision']['description'] == "") $newxml['revision']['description'] = "Unknown"; - $tocache[$tocheck] = array('description' => $newxml['revision']['description']); + if($newxml['version'] == "") + $newxml['version'] = "?"; + $tocache[$tocheck] = array('description' => $newxml['revision']['description'], 'version' => $newxml['version']); } } foreach($backups as $checkbak) { @@ -771,7 +773,7 @@ function cleanup_backupcache($revisions = 30, $lock = false) { if($g['booting']) print " " . $tocheck . "r"; } } - foreach($newbaks as $todo) $tocache[$todo['time']] = array('description' => $todo['description']); + foreach($newbaks as $todo) $tocache[$todo['time']] = array('description' => $todo['description'], 'version' => $todo['version']); if(is_int($revisions) and (count($tocache) > $revisions)) { $toslice = array_slice(array_keys($tocache), 0, $revisions); foreach($toslice as $sliced) @@ -802,7 +804,7 @@ function get_backups() { sort($bakvers); // $bakvers = array_reverse($bakvers); foreach(array_reverse($bakvers) as $bakver) - $toreturn[] = array('time' => $bakver, 'description' => $confvers[$bakver]['description']); + $toreturn[] = array('time' => $bakver, 'description' => $confvers[$bakver]['description'], 'version' => $confvers[$bakver]['version']); } else { return false; } |