From 91bfbd00e70b844645cbb10884ec1282cb2cf341 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 15 Oct 2009 18:44:59 -0400 Subject: Call conf_mount_rw() and ro where needed --- usr/local/www/diag_confbak.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr/local/www') 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(); -- cgit v1.1