diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-08-22 19:12:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-08-22 19:12:05 +0000 |
commit | 71e191d92501243b53d302a2b4a2f963682ee684 (patch) | |
tree | 052e3b0b8fa9a3451f18eecd95f45f1880ffc0a1 | |
parent | c4f1e4ba13905004fdcef814bdba949ec842ce6b (diff) | |
download | brdo-71e191d92501243b53d302a2b4a2f963682ee684.tar.gz brdo-71e191d92501243b53d302a2b4a2f963682ee684.tar.bz2 |
- Patch 79614 by justin: make redirection work.
-rw-r--r-- | includes/form.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/includes/form.inc b/includes/form.inc index 14769c470..8c4eec84a 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -56,12 +56,7 @@ function drupal_get_form($form_id) { $args = func_get_args(); $form = call_user_func_array('drupal_retrieve_form', $args); - - $redirect = drupal_process_form($form_id, $form); - - if (isset($redirect)) { - drupal_redirect_form($form, $redirect); - } + drupal_process_form($form_id, $form); return drupal_render_form($form_id, $form); } @@ -129,6 +124,9 @@ function drupal_process_form($form_id, &$form) { // In that case we accept a submission without button values. if ((($form['#programmed']) || $form_submitted || (!$form_button_counter[0] && $form_button_counter[1])) && !form_get_errors()) { $redirect = drupal_submit_form($form_id, $form); + if (!$form['#programmed']) { + drupal_redirect_form($form, $redirect); + } } } |