function backup_migrate_delete_confirm_submit in Backup and Migrate 6
Same name and namespace in other branches
- 5 backup_migrate.module \backup_migrate_delete_confirm_submit()
File
- ./
backup_migrate.module, line 171 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (f.e. cache_*)
Code
function backup_migrate_delete_confirm_submit($form, &$form_state) {
$path = $form_state['values']['path'];
if ($path = _backup_migrate_path_is_in_save_dir($path)) {
file_delete($path);
}
watchdog('backup_migrate', 'Database backup file deleted: %file', array(
'%file' => $path,
));
$redir = strpos($path, '/scheduled/') ? 'admin/content/backup_migrate/files/scheduled' : 'admin/content/backup_migrate/files';
$form_state['redirect'] = user_access('access backup files') ? $redir : "admin/content/backup_migrate";
}