summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-04-07 13:00:37 +0000
committerGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-04-07 13:00:37 +0000
commit14178a50f1f3a3a0c5e422c00830deca0e0cb498 (patch)
treede865101d1512a5c44c7c0b7f0aec5294951929e /includes
parentc5cb3059607b3961ece274a3608145f14305a485 (diff)
downloadbrdo-14178a50f1f3a3a0c5e422c00830deca0e0cb498.tar.gz
brdo-14178a50f1f3a3a0c5e422c00830deca0e0cb498.tar.bz2
#55408, hook_validate called twice, patch by chx
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc6
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) {