function drush_hosting_site_pre_hosting_task in Hosting 5
Same name and namespace in other branches
- 6.2 site/hosting_site.drush.inc \drush_hosting_site_pre_hosting_task()
- 7.4 site/hosting_site.drush.inc \drush_hosting_site_pre_hosting_task()
- 7.3 site/hosting_site.drush.inc \drush_hosting_site_pre_hosting_task()
Map values of site node into command line arguments
File
- site/
hosting_site.drush.inc, line 7
Code
function drush_hosting_site_pre_hosting_task($task) {
$task =& drush_get_context('HOSTING_TASK');
if ($task->ref->type == 'site') {
$task->args[0] = $task->ref->title;
$task->options['site_id'] = $task->ref->nid;
if ($task->task_type != 'import') {
$task->options['language'] = $task->ref->language;
}
}
if ($task->task_type == 'restore') {
$backup = hosting_site_get_backup($task->task_args['bid']);
$task->args[1] = $backup['filename'];
}
}