diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-07 13:00:37 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-07 13:00:37 +0000 |
commit | 14178a50f1f3a3a0c5e422c00830deca0e0cb498 (patch) | |
tree | de865101d1512a5c44c7c0b7f0aec5294951929e /includes | |
parent | c5cb3059607b3961ece274a3608145f14305a485 (diff) | |
download | brdo-14178a50f1f3a3a0c5e422c00830deca0e0cb498.tar.gz brdo-14178a50f1f3a3a0c5e422c00830deca0e0cb498.tar.bz2 |
#55408, hook_validate called twice, patch by chx
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc index c0b61b661..1857017bc 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -156,6 +156,11 @@ function drupal_get_form($form_id, &$form, $callback = NULL) { function drupal_validate_form($form_id, &$form, $callback = NULL) { global $form_values; + static $validated_forms = array(); + + if (isset($validated_forms[$form_id])) { + return; + } if (isset($form['#token'])) { if ($form_values['form_token'] != md5(session_id() . $form['#token'] . variable_get('drupal_private_key', ''))) { @@ -165,6 +170,7 @@ function drupal_validate_form($form_id, &$form, $callback = NULL) { } _form_validate($form, $form_id); + $validated_forms[$form_id] = TRUE; } function drupal_submit_form($form_id, $form, $callback = NULL) { |