You are here

function backup_migrate_destination_delete_file in Backup and Migrate 5.2

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

Delete a file in the given destination.

1 call to backup_migrate_destination_delete_file()
backup_migrate_ui_destination_delete_file_confirm_submit in includes/destinations.inc
Delete confirmed, perform the delete.

File

includes/destinations.inc, line 257
All of the destination handling code needed for Backup and Migrate.

Code

function backup_migrate_destination_delete_file($destination_id, $file_id) {
  if ($destination = backup_migrate_get_destination($destination_id)) {

    // Include the necessary file if specified by the download type.
    if (!empty($destination['file'])) {
      require_once './' . $destination['file'];
    }

    // Call the specified delete callback.
    if (!empty($destination['delete_callback'])) {
      return $destination['delete_callback']($destination, $file_id);
    }
  }
}