function backup_migrate_destination::get_file_links

cis7 destinations.inc backup_migrate_destination::get_file_links($file_id)
cle7 destinations.inc backup_migrate_destination::get_file_links($file_id)
elmsmedia7 destinations.inc backup_migrate_destination::get_file_links($file_id)
icor7 destinations.inc backup_migrate_destination::get_file_links($file_id)
meedjum_blog7 destinations.inc backup_migrate_destination::get_file_links($file_id)
mooc7 destinations.inc backup_migrate_destination::get_file_links($file_id)

Get the action links for a file on a given destination.

File

sites/all/modules/ulmus/backup_migrate/includes/destinations.inc, line 867
All of the destination handling code needed for Backup and Migrate.

Class

backup_migrate_destination
A base class for creating destinations.

Code

function get_file_links($file_id) {
  $out = array(
    'download' => '',
    'restore' => '',
    'delete' => '',
  );

  // Don't display the download/delete/restore ops if they are not available for this destination.
  $can_read = $this->can_read_file($file_id);
  $can_delete = $this->can_delete_file($file_id);

  $destination_id = $this->get_id();
  if ($can_read && user_access("access backup files")) {
    $out['download'] = l(t("download"), BACKUP_MIGRATE_MENU_PATH . "/destination/downloadfile/" . $destination_id . '/' . $file_id);
  }
  if ($can_read && user_access("restore from backup")) {
    $out['restore'] = l(t("restore"), BACKUP_MIGRATE_MENU_PATH . "/destination/restorefile/" . $destination_id . '/' . $file_id);
  }
  if ($can_delete && user_access("delete backup files")) {
    $out['delete'] = l(t("delete"), BACKUP_MIGRATE_MENU_PATH . "/destination/deletefile/" . $destination_id . '/' . $file_id);
  }
  return $out;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.