You are here

function drush_hosting_alias_pre_hosting_task in Hosting 5

Same name and namespace in other branches
  1. 6.2 alias/hosting_alias.drush.inc \drush_hosting_alias_pre_hosting_task()
  2. 7.4 alias/hosting_alias.drush.inc \drush_hosting_alias_pre_hosting_task()
  3. 7.3 alias/hosting_alias.drush.inc \drush_hosting_alias_pre_hosting_task()

File

alias/hosting_alias.drush.inc, line 3

Code

function drush_hosting_alias_pre_hosting_task() {
  if (module_exists('hosting_alias')) {
    $task =& drush_get_context('HOSTING_TASK');
    if ($task->ref->type == 'site' && in_array($task->task_type, array(
      'install',
      'verify',
      'migrate',
    ))) {
      $task->options['aliases'] = implode(",", hosting_alias_get_aliases($task->ref));
    }
  }
}