Commit 71e191d9 authored by Dries's avatar Dries
Browse files

- Patch 79614 by justin: make redirection work.

parent c4f1e4ba
......@@ -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);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment