mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix info display. We can't use the array generated by get_backups() - it's suited for iteration, rather than fast retrieval.
This commit is contained in:
parent
cdc0ed31fe
commit
1d478d9624
@ -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'] . "\".";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user