You are here

function hosting_site_post_hosting_delete_task in Hosting 6.2

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

implementation of hook_hosting_post_DELETE

File

site/hosting_site.drush.inc, line 159

Code

function hosting_site_post_hosting_delete_task($task, $data) {
  if ($task->ref->type == 'site') {
    $task->ref->site_status = HOSTING_SITE_DELETED;
    $task->ref->no_verify = TRUE;
    hosting_context_delete($task->ref->nid);
    node_save($task->ref);

    // Record the backup created during delete.
    $task->task_args['description'] = t('Pre-delete backup');
    hosting_site_post_hosting_backup_task($task, $data);

    // Clean up package instances
    hosting_package_instance_sync($task->ref->nid, 'site');
  }
}