diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-20 07:11:37 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-20 07:11:37 +0000 |
commit | 297ed741f8d32569b82ea44ea144e332f595933b (patch) | |
tree | 6805754a09793c41ae3b1929a183a082b7476c32 /includes/form.inc | |
parent | 4e9a12ddb8f3d3c986aa9213df1ee7f0bd90f655 (diff) | |
download | brdo-297ed741f8d32569b82ea44ea144e332f595933b.tar.gz brdo-297ed741f8d32569b82ea44ea144e332f595933b.tar.bz2 |
#58221, Turn #after_build into a functions array in order to make validation of date fields possible. Patch by yched, tenrapid
Also makes forms API more consistent (see #pre_render)
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/form.inc b/includes/form.inc index 2f9e9e76a..4c77f9c59 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -424,9 +424,12 @@ function form_builder($form_id, $form) { $count++; } - if (isset($form['#after_build']) && function_exists($form['#after_build']) && !isset($form['#after_build_done'])) { - $function = $form['#after_build']; - $form = $function($form, $form_values); + if (isset($form['#after_build']) && !isset($form['#after_build_done'])) { + foreach ($form['#after_build'] as $function) { + if (function_exists($function)) { + $form = $function($form, $form_values); + } + } $form['#after_build_done'] = TRUE; } |