diff options
author | Colin Smith <colin@pfsense.org> | 2005-05-11 01:38:01 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-05-11 01:38:01 +0000 |
commit | a0a73ad0b500f5ae69eb15c163804efc5e13c97e (patch) | |
tree | 1a7bb662d71dec6b0637b7dbdf01b063b845ae40 | |
parent | fd989c9035264e640eef73f93c6af396ad203062 (diff) | |
download | pfsense-a0a73ad0b500f5ae69eb15c163804efc5e13c97e.zip pfsense-a0a73ad0b500f5ae69eb15c163804efc5e13c97e.tar.gz |
Make sure we toss the new backup information in the same array element.
-rw-r--r-- | etc/inc/config.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index a15ea79..bfe6344 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -524,8 +524,9 @@ function write_config($desc="Unknown") { } else { $backupcache = array(); } - $backupcache[]['time'] = $changetime; - $backupcache[]['description'] = $desc; + $backupcache[] = array('time' => $changetime, + 'description' => $desc + ); $bakout = fopen($g['cf_conf_path'] . '/backup/backup.cache', "w"); fwrite($bakout, serialize($backupcache)); fclose($bakout); @@ -952,7 +953,7 @@ function system_start_ftp_helpers() { function get_backups() { if(file_exists("/conf/backup/backup.cache")) { - $confvers = array_reverse(file("/conf/backup/backup.cache")); + $confvers = array_reverse(unserialize("/conf/backup/backup.cache")); foreach($confvers as $index => $toproc) { if(trim($toproc) == $config['revision']['time']) { array_splice($confvers, $index, 0, array(trim($toproc))); |