You are here

function backup_migrate_ui_destination_delete_file in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.2 includes/destinations.inc \backup_migrate_ui_destination_delete_file()
  2. 8.3 includes/destinations.inc \backup_migrate_ui_destination_delete_file()
  3. 5.2 includes/destinations.inc \backup_migrate_ui_destination_delete_file()
  4. 6.2 includes/destinations.inc \backup_migrate_ui_destination_delete_file()
  5. 7.3 includes/destinations.inc \backup_migrate_ui_destination_delete_file()
  6. 7.2 includes/destinations.inc \backup_migrate_ui_destination_delete_file()

Menu callback to delete a file from a destination.

1 string reference to 'backup_migrate_ui_destination_delete_file'
backup_migrate_destination::get_menu_items in includes/destinations.inc
Add the menu items specific to the destination type.

File

includes/destinations.inc, line 462

Code

function backup_migrate_ui_destination_delete_file($destination_id = NULL, $file_id = NULL) {
  if (backup_migrate_destination_file_exists($destination_id, $file_id)) {
    return drupal_get_form('backup_migrate_ui_destination_delete_file_confirm', $destination_id, $file_id);
  }
  _backup_migrate_message('Cannot delete the file: %file_id because it does not exist.', array(
    '%file_id' => $file_id,
  ), 'error');
  if ($destination_id && user_access('access backup files')) {
    drupal_goto(BACKUP_MIGRATE_MENU_PATH . '/destination/list/files/' . $destination_id);
  }
  drupal_goto(BACKUP_MIGRATE_MENU_PATH);
}