summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/config.inc2
-rwxr-xr-xusr/local/www/diag_confbak.php4
2 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 84a025b..0312fd3 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -210,4 +210,4 @@ if($config_parsed == true) {
}
}
-?>
+?> \ No newline at end of file
diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php
index 2015c91..fc0871e 100755
--- a/usr/local/www/diag_confbak.php
+++ b/usr/local/www/diag_confbak.php
@@ -41,17 +41,21 @@
require("guiconfig.inc");
if($_GET['newver'] != "") {
+ conf_mount_rw();
$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
$savemsg = "Unable to revert to the selected configuration.";
+ conf_mount_ro();
}
if($_GET['rmver'] != "") {
+ conf_mount_rw();
$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'] . "\".";
+ conf_mount_ro();
}
cleanup_backupcache();
OpenPOWER on IntegriCloud