Revision 91bfbd00
Added by Scott Ullrich almost 16 years ago
etc/inc/config.inc | ||
---|---|---|
210 | 210 |
} |
211 | 211 |
} |
212 | 212 |
|
213 |
?> |
|
213 |
?> |
usr/local/www/diag_confbak.php | ||
---|---|---|
41 | 41 |
require("guiconfig.inc"); |
42 | 42 |
|
43 | 43 |
if($_GET['newver'] != "") { |
44 |
conf_mount_rw(); |
|
44 | 45 |
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); |
45 | 46 |
if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) |
46 | 47 |
$savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\"."; |
47 | 48 |
else |
48 | 49 |
$savemsg = "Unable to revert to the selected configuration."; |
50 |
conf_mount_ro(); |
|
49 | 51 |
} |
50 | 52 |
|
51 | 53 |
if($_GET['rmver'] != "") { |
54 |
conf_mount_rw(); |
|
52 | 55 |
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); |
53 | 56 |
unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml'); |
54 | 57 |
$savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\"."; |
58 |
conf_mount_ro(); |
|
55 | 59 |
} |
56 | 60 |
|
57 | 61 |
cleanup_backupcache(); |
Also available in: Unified diff
Call conf_mount_rw() and ro where needed