You are here

function hosting_site_post_hosting_restore_task in Hosting 6.2

Same name and namespace in other branches
  1. 5 site/hosting_site.drush.inc \hosting_site_post_hosting_restore_task()
  2. 7.4 site/hosting_site.drush.inc \hosting_site_post_hosting_restore_task()
  3. 7.3 site/hosting_site.drush.inc \hosting_site_post_hosting_restore_task()

implementation of hook_hosting_post_restore I am not very fond of the use of bitwise operators with negatives.

File

site/hosting_site.drush.inc, line 140

Code

function hosting_site_post_hosting_restore_task($task, $data) {
  if ($data['context']['backup_file'] && $task->ref->type == 'site') {
    $platform = node_load($task->ref->platform);
    hosting_site_add_backup($task->ref->nid, $platform->web_server, $data['context']['backup_file'], t('Generated before being restored to a previous version'), $data['context']['backup_file_size']);
  }
}