diff --git a/deploy.module b/deploy.module index 39335d0..1e5dd93 100644 --- a/deploy.module +++ b/deploy.module @@ -265,10 +265,11 @@ function deploy_iterator($entities) { /** * Helper function to get operation info. */ -function deploy_get_operation_info($event_name = NULL) { +function deploy_get_operation_info($event_name = NULL, $plan_name = NULL) { $cache = &drupal_static(__FUNCTION__); if (empty($cache)) { $operations = module_invoke_all('deploy_operation_info'); + drupal_alter('deploy_operation_info', $operations, $plan_name); foreach (array('preprocess', 'postprocess') as $event) { // Avoid empty keys. if (!isset($operations[$event])) { diff --git a/includes/DeployPlan.inc b/includes/DeployPlan.inc index 3df12e6..385edf7 100644 --- a/includes/DeployPlan.inc +++ b/includes/DeployPlan.inc @@ -148,7 +148,7 @@ class DeployPlan { try { $deployment_key = deploy_log($this->name, DEPLOY_STATUS_STARTED); // Allow other modules to do some preprocessing. - $operations = deploy_get_operation_info('preprocess'); + $operations = deploy_get_operation_info('preprocess', $this->name); $this->processor->preProcess($operations); // Log that we are going into the processing phase. @@ -183,7 +183,7 @@ class DeployPlan { // TODO: This has to be moved, to be triggered by each processor instead. // The reason is because it's not guaratneed that the deployment has // actually run here. Only the processor it self knows. - $operations = deploy_get_operation_info('postprocess'); + $operations = deploy_get_operation_info('postprocess', $this->name); $this->processor->postProcess($operations); } catch (Exception $e) {