function drush_hosting_site_pre_hosting_task in Hostmaster (Aegir) 6
Map values of site node into command line arguments
File
- modules/
hosting/ site/ hosting_site.drush.inc, line 55
Code
function drush_hosting_site_pre_hosting_task($task) {
$task =& drush_get_context('HOSTING_TASK');
if ($task->task_type == 'restore') {
$backup = hosting_site_get_backup($task->task_args['bid']);
$task->args[1] = $backup['filename'];
}
if ($task->task_type == 'backup_delete') {
foreach ($task->task_args as $bid => $filename) {
if ($filename !== '0') {
$backups[] = $filename;
}
}
$task->args[1] = implode(',', $backups);
}
}