From 00ae7949efd1d347a954d3070b0b7cce9359fa4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Fri, 14 Sep 2007 10:40:55 +0000 Subject: #172824 by yched: let the batched processes perform drupal_execute() properly --- includes/form.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/form.inc b/includes/form.inc index 74d8f54b1..ca6795c67 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -315,8 +315,10 @@ function drupal_process_form($form_id, &$form, &$form_state) { } // If batches were set in the submit handlers, we process them now, - // possibly ending execution. - if ($batch =& batch_get()) { + // possibly ending execution. We make sure we do not react to the batch + // that is already being processed (if a batch operation performs a + // drupal_execute). + if ($batch =& batch_get() && !isset($batch['current_set'])) { // The batch uses its own copies of $form and $form_state for // late execution of submit handers and post-batch redirection. $batch['form'] = $form; -- cgit v1.2.3