diff --git a/plugins/operation_types/action.class.php b/plugins/operation_types/action.class.php index 9e36e3f..fb5e47e 100644 --- a/plugins/operation_types/action.class.php +++ b/plugins/operation_types/action.class.php @@ -235,9 +235,12 @@ class ViewsBulkOperationsAction extends ViewsBulkOperationsBaseOperation { * @param $context * An array of related data (selected views rows, etc). * @param $vbo_sandbox - * An array of variables to persist between the batch calls. + * An array of variables to persist between the batch calls and get passed + * to the finish method. + * + * @see ViewsBulkOperationsBaseOperation::finish() */ - public function execute($data, array $context, &$vbo_sandbox) { + public function execute($data, array $context, array &$vbo_sandbox) { $context['entity_type'] = $this->entityType; $context['settings'] = $this->getAdminOption('settings', array()); $context += $this->formOptions; diff --git a/plugins/operation_types/base.class.php b/plugins/operation_types/base.class.php index ca2d060..ef9fd2f 100644 --- a/plugins/operation_types/base.class.php +++ b/plugins/operation_types/base.class.php @@ -265,14 +265,22 @@ abstract class ViewsBulkOperationsBaseOperation { * @param $context * An array of related data (selected views rows, etc). * @param $vbo_sandbox - * An array of variables to persist between the batch calls. + * An array of variables to persist between the batch calls and get passed + * to the finish method. + * + * @see ViewsBulkOperationsBaseOperation::finish() */ - abstract function execute($data, array $context, &$vbo_sandbox); + abstract function execute($data, array $context, array &$vbo_sandbox); /** * Executes during the finish callback of the batch operation. + * + * @param $success + * Indicates whether or not there were any fatal errors during execution. + * @param $vbo_sandbox + * An array of variables that has persisted through each batch call. */ - public function finish($vbo_sandbox) { + public function finish($success, array $vbo_sandbox) { // This is empty so that other handlers don't have to implement if they // don't need to. } diff --git a/plugins/operation_types/rules_component.class.php b/plugins/operation_types/rules_component.class.php index 542e704..dd4a474 100644 --- a/plugins/operation_types/rules_component.class.php +++ b/plugins/operation_types/rules_component.class.php @@ -115,9 +115,12 @@ class ViewsBulkOperationsRulesComponent extends ViewsBulkOperationsBaseOperation * @param $context * An array of related data (selected views rows, etc). * @param $vbo_sandbox - * An array of variables to persist between the batch calls. + * An array of variables to persist between the batch calls and get passed + * to the finish method. + * + * @see ViewsBulkOperationsBaseOperation::finish() */ - public function execute($data, array $context, &$vbo_sandbox) { + public function execute($data, array $context, array &$vbo_sandbox) { // If there was a config form, there's a rules_element. // If not, fallback to the component key. if ($this->configurable()) { diff --git a/views_bulk_operations.module b/views_bulk_operations.module index 9c6bb31..c751442 100644 --- a/views_bulk_operations.module +++ b/views_bulk_operations.module @@ -1114,7 +1114,7 @@ function views_bulk_operations_direct_process($operation, $rows, $options) { */ function views_bulk_operations_execute_finished($success, $results, $operations) { $operation = $results['operation']; - $operation->finish($results['sandbox']); + $operation->finish($success, $results['sandbox']); if ($success) { if (count($results['log']) > 1) {