--- a/src/usr/local/www/diag_confbak.php +++ b/src/usr/local/www/diag_confbak.php @@ -64,6 +64,24 @@ $savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['rmver']), htmlspecialchars($confvers[$_POST['rmver']]['description'])); } +if ($_REQUEST['del_x'] == 'DelAll') { + if (is_array($_REQUEST['confdel_x']) && count($_REQUEST['confdel_x'])) { + $savemsg = ""; + foreach ($_REQUEST['confdel_x'] as $version) { + $conf_file = g_get('conf_path') . '/backup/config-' . $version . '.xml'; + if (file_exists($conf_file)) { + unlink($conf_file); + $savemsg .= sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s"
'), date(gettext("n/j/y H:i:s"), $version), htmlspecialchars($confvers[$version]['description'])); + $savemsg .= gettext('     ->' . htmlspecialchars($g['conf_path']) . '/backup/config-' . htmlspecialchars($version) . '.xml' . "
"); + } else { + $input_errors[] .= gettext("Could not find config file: " . htmlspecialchars($conf_file)); + } + } + } else { + $input_errors = gettext("You must select at least one config to delete."); + } +} + if ($_REQUEST['getcfg'] != "") { $_REQUEST['getcfg'] = basename($_REQUEST['getcfg']); send_user_download('file', @@ -94,7 +112,7 @@ unset($confvers['versions']); $pgtitle = array(gettext("Diagnostics"), htmlspecialchars(gettext("Backup & Restore")), gettext("Config History")); -$pglinks = array("", "diag_backup.php", "@self"); +$pglinks = array("", "diag_backup.php", "diag_confbak.php"); include("head.inc"); if ($input_errors) { @@ -215,6 +233,12 @@ + + + @@ -233,6 +257,7 @@ - + @@ -263,8 +288,12 @@ + + + @@ -276,6 +305,18 @@ + + + +