You are here

function drush_hosting_subdirs_post_hosting_task in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 subdirs/hosting_subdirs.drush.inc \drush_hosting_subdirs_post_hosting_task()

Implements drush_HOOK_post_COMMAND().

File

subdirs/hosting_subdirs.drush.inc, line 28
Implement drush hooks for the hosting migrate module.

Code

function drush_hosting_subdirs_post_hosting_task($task) {
  $task =& drush_get_context('HOSTING_TASK');
  if ($task->ref->type == 'site' && $task->task_type == 'migrate') {
    $site = $task->ref;
    if (!_hosting_subdirs_is_a_subdir_site($site)) {
      return;
    }

    // Trigger a new verify to re-sync the front-end aliases into the back-end
    // context, so that the subdir redirection works.
    hosting_add_task($site->nid, 'verify');
  }
}