diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-28 01:45:41 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-28 01:45:41 +0000 |
commit | cad28df22b5077056e80709d6ec544bb82000e8b (patch) | |
tree | eec44bc9023af3f5e9966cdb00f4391fc6568eaf | |
parent | fc7f5affd1c26266f5cb36498ddbb58f339032b2 (diff) | |
download | brdo-cad28df22b5077056e80709d6ec544bb82000e8b.tar.gz brdo-cad28df22b5077056e80709d6ec544bb82000e8b.tar.bz2 |
#56089, $form['#redirect'] shouldn't be clobbered by the _submit return value., second try, patch by chx
-rw-r--r-- | includes/form.inc | 3 | ||||
-rw-r--r-- | modules/system.module | 2 | ||||
-rw-r--r-- | modules/system/system.module | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/includes/form.inc b/includes/form.inc index 3e030ae1b..18ae0b145 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -126,6 +126,9 @@ function drupal_get_form($form_id, &$form, $callback = NULL) { if (is_array($goto)) { call_user_func_array('drupal_goto', $redirect); } + elseif (!isset($goto)) { + drupal_goto($_GET['q']); + } else { drupal_goto($goto); } diff --git a/modules/system.module b/modules/system.module index 6868f6cb6..d52197656 100644 --- a/modules/system.module +++ b/modules/system.module @@ -55,7 +55,7 @@ function system_perm() { */ function system_elements() { // Top level form - $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => $_GET['q']); + $type['form'] = array('#method' => 'post', '#action' => request_uri()); // Inputs $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1); diff --git a/modules/system/system.module b/modules/system/system.module index 6868f6cb6..d52197656 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -55,7 +55,7 @@ function system_perm() { */ function system_elements() { // Top level form - $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => $_GET['q']); + $type['form'] = array('#method' => 'post', '#action' => request_uri()); // Inputs $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1); |