You are here

function drush_hosting_migrate_pre_hosting_task in Hosting 5

Same name and namespace in other branches
  1. 6.2 migrate/hosting_migrate.drush.inc \drush_hosting_migrate_pre_hosting_task()
  2. 7.4 migrate/hosting_migrate.drush.inc \drush_hosting_migrate_pre_hosting_task()
  3. 7.3 migrate/hosting_migrate.drush.inc \drush_hosting_migrate_pre_hosting_task()

File

migrate/hosting_migrate.drush.inc, line 3

Code

function drush_hosting_migrate_pre_hosting_task($task) {
  $task =& drush_get_context('HOSTING_TASK');
  if ($task->ref->type == 'site' && $task->task_type == 'migrate') {
    $platform = node_load($task->task_args['target_platform']);
    $task->args[2] = $platform->publish_path;
  }
}