You are here

function hosting_site_post_hosting_import_task in Hosting 7.3

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

Implements hook_post_hosting_import_task().

File

site/hosting_site.drush.inc, line 230
Drush hooks for the Hosting site module.

Code

function hosting_site_post_hosting_import_task($task, $data) {
  $site_nid = hosting_drush_import($task->ref->hosting_name);

  // Update the site node with the database name.
  $node = node_load($site_nid);
  $node->db_name = $data['self']['db_name'];
  node_save($node);
  $packages = $data['context']['packages'];
  hosting_package_sync($packages);
  hosting_package_instance_sync($task->ref->nid, $task->ref->type, $packages);
}