From b7aae4f8856df37777ba3377d157ba40dfea8bef Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 4 Feb 2010 03:34:21 +0000 Subject: [PATCH] #539220 follow-up by mr.baileys: Fix test failures. --- includes/form.inc | 21 +++++++++++---------- modules/locale/locale.admin.inc | 1 - 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/includes/form.inc b/includes/form.inc index 9d3158c9351..9875c1b0a18 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -970,8 +970,8 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) { // #value data. elseif (isset($elements['#element_validate'])) { foreach ($elements['#element_validate'] as $function) { - $function($elements, $form_state, $form_state['complete form']); - } + $function($elements, $form_state, $form_state['complete form']); + } } $elements['#validated'] = TRUE; } @@ -1012,14 +1012,15 @@ function form_execute_handlers($type, &$form, &$form_state) { } foreach ($handlers as $function) { - // Check to see if a previous _submit handler has set a batch, but - // make sure we do not react to a batch that is already being processed - // (for instance if a batch operation performs a drupal_form_submit()). - if ($type == 'submit' && ($batch =& batch_get()) && !isset($batch['current_set'])) { - // Some previous _submit handler has set a batch. We store the call - // in a special 'control' batch set, for execution at the correct - // time during the batch processing workflow. + // Check if a previous _submit handler has set a batch, but make sure we + // do not react to a batch that is already being processed (for instance + // if a batch operation performs a drupal_form_submit()). + if ($type == 'submit' && ($batch =& batch_get()) && !isset($batch['id'])) { + // Some previous submit handler has set a batch. To ensure correct + // execution order, store the call in a special 'control' batch set. + // See _batch_next_set(). $batch['sets'][] = array('form_submit' => $function); + $batch['has_form_submits'] = TRUE; } else { $function($form, $form_state); @@ -2457,7 +2458,7 @@ function theme_container($variables) { * - element: An associative array containing the properties and children of * the tableselect element. Properties used: #header, #options, #empty, * and #js_select. The #options property is an array of selection options; - * each array element of #options is an array of properties. These + * each array element of #options is an array of properties. These * properties can include #attributes, which is added to the * table row's HTML attributes (see theme_table()). Example: * @code diff --git a/modules/locale/locale.admin.inc b/modules/locale/locale.admin.inc index 4734018ec22..8f96170788e 100644 --- a/modules/locale/locale.admin.inc +++ b/modules/locale/locale.admin.inc @@ -1073,7 +1073,6 @@ function locale_translate_export_pot_form() { $form['export']['submit'] = array('#type' => 'submit', '#value' => t('Export')); // Reuse PO export submission callback. $form['#submit'][] = 'locale_translate_export_po_form_submit'; - $form['#validate'][] = 'locale_translate_export_po_form_validate'; return $form; }