diff --git a/includes/form.inc b/includes/form.inc index 3e030ae1b8a882e7cbb87974ec5fba9b366c8c1a..18ae0b14592c801faec7f33a7da3c87a1aa02f2e 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 6868f6cb621a1eba6114936eff42cf2b2c824eb1..d5219765661f9cdec5270af5eb5094f1dd3be3ff 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 6868f6cb621a1eba6114936eff42cf2b2c824eb1..d5219765661f9cdec5270af5eb5094f1dd3be3ff 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);