From 1d478d96246e227197aee1fa68cccdbc2e7e6d8a Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Wed, 18 May 2005 03:14:45 +0000 Subject: [PATCH] Fix info display. We can't use the array generated by get_backups() - it's suited for iteration, rather than fast retrieval. --- usr/local/www/diag_confbak.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php index 0a3064056c..1be5efc3df 100755 --- a/usr/local/www/diag_confbak.php +++ b/usr/local/www/diag_confbak.php @@ -31,7 +31,7 @@ require("guiconfig.inc"); if($_GET['newver'] != "") { - $confvers = get_backups(); + $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) { $savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\"."; } else { @@ -40,7 +40,7 @@ if($_GET['newver'] != "") { } if($_GET['rmver'] != "") { - $confvers = get_backups(); + $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml'); $savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\"."; }