diff --git a/drush/https.drush.inc b/drush/https.drush.inc index 1b0a4a5..a6d092a 100644 --- a/drush/https.drush.inc +++ b/drush/https.drush.inc @@ -23,3 +23,32 @@ function https_provision_register_autoload() { } } +/** + * Implements hook_hosting_TASK_OBJECT_context_options(). + * + * @param $task + */ +function https_hosting_site_context_options(&$task) { + $node = $task->ref; + + if (isset($node->https_enabled)) { + $task->context_options['https_enabled'] = $node->https_enabled; + } + if (isset($node->https_client_authentication_enabled)) { + $task->context_options['https_client_authentication_enabled'] = $node->https_client_authentication_enabled; + } + if (isset($node->https_key)) { + $task->context_options['https_key'] = $node->https_key; + } +} + +/** + * Implements hook_drush_context_import(). + */ +function https_drush_context_import($context, &$node) { + if ($context->type == 'site') { + $node->https_enabled = $context->https_enabled; + $node->https_client_authentication_enabled = $context->https_client_authentication_enabled; + $node->https_key = $context->https_key; + } +}