summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-04 03:34:21 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-04 03:34:21 +0000
commitb7aae4f8856df37777ba3377d157ba40dfea8bef (patch)
treedaa04a733ce57c0d715104eb4b1b77e6e57baa8a
parentec407ec945da8b7afee5c20f16cac6c041db1e25 (diff)
downloadbrdo-b7aae4f8856df37777ba3377d157ba40dfea8bef.tar.gz
brdo-b7aae4f8856df37777ba3377d157ba40dfea8bef.tar.bz2
#539220 follow-up by mr.baileys: Fix test failures.
-rw-r--r--includes/form.inc21
-rw-r--r--modules/locale/locale.admin.inc1
2 files changed, 11 insertions, 11 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 9d3158c93..9875c1b0a 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 4734018ec..8f9617078 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;
}