Index: includes/ajax.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/ajax.inc,v
retrieving revision 1.8
diff -u -p -r1.8 ajax.inc
--- includes/ajax.inc	5 Sep 2009 15:05:01 -0000	1.8
+++ includes/ajax.inc	20 Sep 2009 06:08:53 -0000
@@ -184,7 +184,7 @@ function ajax_get_form() {
   }
 
   // Since some of the submit handlers are run, redirects need to be disabled.
-  $form['#redirect'] = FALSE;
+  $form_state['no_redirect'] = TRUE;
 
   // The form needs to be processed; prepare for that by setting a few internal
   // variables.
Index: includes/batch.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/batch.inc,v
retrieving revision 1.37
diff -u -p -r1.37 batch.inc
--- includes/batch.inc	26 Aug 2009 15:00:17 -0000	1.37
+++ includes/batch.inc	20 Sep 2009 07:20:35 -0000
@@ -426,7 +426,7 @@ function _batch_finished() {
   if ($_batch['progressive']) {
     // Revert the 'destination' that was saved in batch_process().
     if (isset($_batch['destination'])) {
-      $_REQUEST['destination'] = $_batch['destination'];
+      $_GET['destination'] = $_batch['destination'];
     }
 
     // Determine the target path to redirect to.
@@ -441,12 +441,11 @@ function _batch_finished() {
     }
 
     // Use drupal_redirect_form() to handle the redirection logic.
-    $form = isset($batch['form']) ? $batch['form'] : array();
-    if (empty($_batch['form_state']['rebuild']) && empty($_batch['form_state']['storage'])) {
-      drupal_redirect_form($form, $redirect);
+    if (empty($_batch['form_state']['rebuild']) && empty($_batch['form_state']['storage']) && empty($_batch['form_state']['no_redirect'])) {
+      drupal_redirect_form($redirect);
     }
 
-    // We get here if $form['#redirect'] was FALSE, or if the form is a
+    // We get here if $form_state['no_redirect'] was TRUE, or if the form is a
     // multi-step form. We save the final $form_state value to be retrieved
     // by drupal_get_form(), and redirect to the originating page.
     $_SESSION['batch_form_state'] = $_batch['form_state'];
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.992
diff -u -p -r1.992 common.inc
--- includes/common.inc	18 Sep 2009 10:54:20 -0000	1.992
+++ includes/common.inc	20 Sep 2009 07:36:14 -0000
@@ -364,8 +364,8 @@ function drupal_query_string_encode($que
  * @see drupal_goto()
  */
 function drupal_get_destination() {
-  if (isset($_REQUEST['destination'])) {
-    return 'destination=' . urlencode($_REQUEST['destination']);
+  if (isset($_GET['destination'])) {
+    return 'destination=' . urlencode($_GET['destination']);
   }
   else {
     // Use $_GET here to retrieve the original path in source form.
@@ -418,9 +418,8 @@ function drupal_get_destination() {
  * @see drupal_get_destination()
  */
 function drupal_goto($path = '', $query = NULL, $fragment = NULL, $http_response_code = 302) {
-
-  if (isset($_REQUEST['destination'])) {
-    extract(parse_url(urldecode($_REQUEST['destination'])));
+  if (isset($_GET['destination'])) {
+    extract(parse_url(urldecode($_GET['destination'])));
   }
 
   $args = array(
@@ -471,8 +470,8 @@ function drupal_not_found() {
   watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
 
   // Keep old path for reference, and to allow forms to redirect to it.
-  if (!isset($_REQUEST['destination'])) {
-    $_REQUEST['destination'] = $_GET['q'];
+  if (!isset($_GET['destination'])) {
+    $_GET['destination'] = $_GET['q'];
   }
 
   $path = drupal_get_normal_path(variable_get('site_404', ''));
@@ -502,8 +501,8 @@ function drupal_access_denied() {
   watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
 
   // Keep old path for reference, and to allow forms to redirect to it.
-  if (!isset($_REQUEST['destination'])) {
-    $_REQUEST['destination'] = $_GET['q'];
+  if (!isset($_GET['destination'])) {
+    $_GET['destination'] = $_GET['q'];
   }
 
   $path = drupal_get_normal_path(variable_get('site_403', ''));
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.373
diff -u -p -r1.373 form.inc
--- includes/form.inc	18 Sep 2009 00:12:45 -0000	1.373
+++ includes/form.inc	20 Sep 2009 08:23:15 -0000
@@ -581,17 +581,17 @@ function drupal_process_form($form_id, &
 
       // The form is executed. By default, we're finished now and redirect to a
       // new destination page. The path of the destination page can be set in
-      // $form['#redirect'] or $form_state['redirect']. If neither of the two is
-      // set, the user is redirect to the current page, which means a fresh,
-      // unpopulated copy of the form.
+      // $form_state['redirect']. If that is not set, the user is redirected to
+      // the current page, which means a fresh, unpopulated copy of the form.
       // Redirection is skipped, though, if
-      // - the form was called by drupal_form_submit(),
+      // - the form was called by drupal_form_submit().
       // - the form has to be rebuilt because either $form_state['rebuild'] was
-      //   set to TRUE or $form_state['storage'] was populated by a submit handler.
-      // - $form_state['no_redirect'] is set to TRUE,
-      // - $form_state['redirect'] or $form['#redirect'] is set to FALSE.
+      //   set to TRUE or $form_state['storage'] was populated by a submit
+      //   handler.
+      // - $form_state['no_redirect'] is set to TRUE.
+      // - $form_state['redirect'] is set to FALSE.
       if (!$form_state['programmed'] && empty($form_state['rebuild']) && empty($form_state['storage']) && empty($form_state['no_redirect'])) {
-        drupal_redirect_form($form, $form_state['redirect']);
+        drupal_redirect_form($form_state['redirect']);
       }
     }
   }
@@ -734,20 +734,15 @@ function drupal_validate_form($form_id, 
 /**
  * Redirect the user to a URL after a form has been processed.
  *
- * @param $form
- *   An associative array containing the structure of the form.
  * @param $redirect
- *   An optional value containing the destination path to redirect
- *   to if none is specified by the form.
+ *   (optional) A destination path to redirect to. This is usually
+ *   $form_state['redirect'], which may be FALSE to specifically skip
+ *   redirection.
  */
-function drupal_redirect_form($form, $redirect = NULL) {
-  $goto = NULL;
+function drupal_redirect_form($redirect = NULL) {
   if (isset($redirect)) {
     $goto = $redirect;
   }
-  if ($goto !== FALSE && isset($form['#redirect'])) {
-    $goto = $form['#redirect'];
-  }
   if (!isset($goto) || ($goto !== FALSE)) {
     if (isset($goto)) {
       if (is_array($goto)) {
@@ -2922,12 +2917,12 @@ function batch_process($redirect = NULL,
     $batch += $process_info;
 
     if ($batch['progressive']) {
-      // Clear the way for the drupal_goto redirection to the batch processing
+      // Clear the way for the drupal_goto() redirection to the batch processing
       // page, by saving and unsetting the 'destination' if any, on both places
       // drupal_goto looks for it.
-      if (isset($_REQUEST['destination'])) {
-        $batch['destination'] = $_REQUEST['destination'];
-        unset($_REQUEST['destination']);
+      if (isset($_GET['destination'])) {
+        $batch['destination'] = $_GET['destination'];
+        unset($_GET['destination']);
       }
 
       // Initiate db storage in order to get a batch id. We have to provide
Index: modules/field_ui/field_ui.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.admin.inc,v
retrieving revision 1.15
diff -u -p -r1.15 field_ui.admin.inc
--- modules/field_ui/field_ui.admin.inc	18 Sep 2009 00:12:46 -0000	1.15
+++ modules/field_ui/field_ui.admin.inc	20 Sep 2009 07:36:24 -0000
@@ -540,7 +540,7 @@ function field_ui_field_overview_form_su
 
   if ($destinations) {
     $destinations[] = urldecode(substr(drupal_get_destination(), 12));
-    unset($_REQUEST['destination']);
+    unset($_GET['destination']);
     $form_state['redirect'] = field_ui_get_destinations($destinations);
   }
 }
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.80
diff -u -p -r1.80 node.pages.inc
--- modules/node/node.pages.inc	18 Sep 2009 00:12:47 -0000	1.80
+++ modules/node/node.pages.inc	20 Sep 2009 07:36:30 -0000
@@ -301,9 +301,9 @@ function node_form($form, &$form_state, 
  */
 function node_form_delete_submit($form, &$form_state) {
   $destination = '';
-  if (isset($_REQUEST['destination'])) {
+  if (isset($_GET['destination'])) {
     $destination = drupal_get_destination();
-    unset($_REQUEST['destination']);
+    unset($_GET['destination']);
   }
   $node = $form['#node'];
   $form_state['redirect'] = array('node/' . $node->nid . '/delete', $destination);
Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.59
diff -u -p -r1.59 openid.module
--- modules/openid/openid.module	17 Sep 2009 03:16:16 -0000	1.59
+++ modules/openid/openid.module	20 Sep 2009 07:36:39 -0000
@@ -445,7 +445,7 @@ function openid_authentication($response
       $_SESSION['openid']['values'] = $form_state['values'];
       // We'll want to redirect back to the same place.
       $destination = drupal_get_destination();
-      unset($_REQUEST['destination']);
+      unset($_GET['destination']);
       drupal_goto('user/register', $destination);
     }
     else {
@@ -463,7 +463,7 @@ function openid_authentication($response
       // Let other modules act on OpenID login
       module_invoke_all('openid_response', $response, $account);
     }
-    drupal_redirect_form($form, $form_state['redirect']);
+    drupal_redirect_form($form_state['redirect']);
   }
   else {
     drupal_set_message(t('Only site administrators can create new user accounts.'), 'error');
Index: modules/openid/openid.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.pages.inc,v
retrieving revision 1.21
diff -u -p -r1.21 openid.pages.inc
--- modules/openid/openid.pages.inc	18 Sep 2009 00:12:47 -0000	1.21
+++ modules/openid/openid.pages.inc	20 Sep 2009 06:08:53 -0000
@@ -111,5 +111,5 @@ function openid_user_delete_form_submit(
   if ($query) {
     drupal_set_message(t('OpenID deleted.'));
   }
-  $form_state['#redirect'] = 'user/' . $form_state['args'][0]->uid . '/openid';
+  $form_state['redirect'] = 'user/' . $form_state['args'][0]->uid . '/openid';
 }
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.315
diff -u -p -r1.315 search.module
--- modules/search/search.module	18 Sep 2009 00:12:47 -0000	1.315
+++ modules/search/search.module	20 Sep 2009 07:36:44 -0000
@@ -925,8 +925,8 @@ function search_box_form_submit($form, &
   // functionality, so we override any static destination set in the request,
   // for example by drupal_access_denied() or drupal_not_found()
   // (see http://drupal.org/node/292565).
-  if (isset($_REQUEST['destination'])) {
-    unset($_REQUEST['destination']);
+  if (isset($_GET['destination'])) {
+    unset($_GET['destination']);
   }
 
   $form_id = $form['form_id']['#value'];
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.203
diff -u -p -r1.203 system.admin.inc
--- modules/system/system.admin.inc	19 Sep 2009 11:07:36 -0000	1.203
+++ modules/system/system.admin.inc	20 Sep 2009 06:08:53 -0000
@@ -1822,7 +1822,7 @@ function system_site_maintenance_mode() 
  * @ingroup forms
  * @see system_settings_form()
  */
-function system_clean_url_settings($form) {
+function system_clean_url_settings($form, &$form_state) {
   global $base_url;
 
   // When accessing this form using a non-clean URL, allow a re-check to make
@@ -1852,7 +1852,7 @@ function system_clean_url_settings($form
   else {
     drupal_add_js(drupal_get_path('module', 'system') . '/system.js');
 
-    $form['#redirect'] = $base_url . '/admin/config/search/clean-urls';
+    $form_state['redirect'] = $base_url . '/admin/config/search/clean-urls';
     $form['clean_url_description'] = array(
       '#type' => 'markup',
       '#markup' => '<p>' . t('Use URLs like <code>example.com/user</code> instead of <code>example.com/?q=user</code>.') . ' ' . t('If you are directed to a <em>Page not found (404)</em> error after testing for clean URLs, see the <a href="@handbook">online handbook</a>.', array('@handbook' => 'http://drupal.org/node/15365')) . '</p>',
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.76
diff -u -p -r1.76 system.test
--- modules/system/system.test	18 Sep 2009 00:12:48 -0000	1.76
+++ modules/system/system.test	20 Sep 2009 06:23:37 -0000
@@ -512,20 +512,14 @@ class AdminMetaTagTestCase extends Drupa
 class AccessDeniedTestCase extends DrupalWebTestCase {
   protected $admin_user;
 
-  /**
-   * Implement getInfo().
-   */
   public static function getInfo() {
     return array(
       'name' => '403 functionality',
-      'description' => "Tests page access denied functionality, including custom 403 pages.",
+      'description' => 'Tests page access denied functionality, including custom 403 pages.',
       'group' => 'System'
     );
   }
 
-  /**
-   * Implement setUp().
-   */
   function setUp() {
     parent::setUp();
 
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.69
diff -u -p -r1.69 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	18 Sep 2009 00:12:48 -0000	1.69
+++ modules/taxonomy/taxonomy.admin.inc	20 Sep 2009 06:08:53 -0000
@@ -469,10 +469,7 @@ function taxonomy_overview_terms($form, 
       '#type' => 'submit',
       '#value' => t('Reset to alphabetical')
     );
-    $form['destination'] = array(
-      '#type' => 'hidden',
-      '#value' => $_GET['q'] . (isset($_GET['page']) ? '?page=' . $_GET['page'] : '')
-    );
+    $form_state['redirect'] = array($_GET['q'], (isset($_GET['page']) ? array('page' => $_GET['page']) : ''));
   }
 
   return $form;
@@ -780,7 +777,7 @@ function taxonomy_form_term($form, &$for
       '#value' => $edit['tid']);
   }
   else {
-    $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']);
+    $form_state['redirect'] = $_GET['q'];
   }
 
   return $form;
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1048
diff -u -p -r1.1048 user.module
--- modules/user/user.module	19 Sep 2009 11:07:37 -0000	1.1048
+++ modules/user/user.module	20 Sep 2009 07:46:25 -0000
@@ -3078,7 +3078,7 @@ function user_register($form, &$form_sta
     );
     // Redirect back to page which initiated the create request;
     // usually admin/people/create.
-    $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']);
+    $form_state['redirect'] = $_GET['q'];
   }
 
   // Create a dummy variable for pass-by-reference parameters.
Index: modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.53
diff -u -p -r1.53 user.pages.inc
--- modules/user/user.pages.inc	18 Sep 2009 00:12:48 -0000	1.53
+++ modules/user/user.pages.inc	20 Sep 2009 07:39:25 -0000
@@ -292,9 +292,9 @@ function user_profile_form_submit($form,
  */
 function user_edit_cancel_submit($form, &$form_state) {
   $destination = '';
-  if (isset($_REQUEST['destination'])) {
+  if (isset($_GET['destination'])) {
     $destination = drupal_get_destination();
-    unset($_REQUEST['destination']);
+    unset($_GET['destination']);
   }
   // Note: We redirect from user/uid/edit to user/uid/cancel to make the tabs disappear.
   $form_state['redirect'] = array("user/" . $form_state['values']['_account']->uid . "/cancel", $destination);
@@ -391,9 +391,7 @@ function user_cancel_confirm_form_submit
   if (user_access('administer users') && empty($form_state['values']['user_cancel_confirm']) && $account->uid != $user->uid) {
     user_cancel($form_state['values'], $account->uid, $form_state['values']['user_cancel_method']);
 
-    if (!isset($_REQUEST['destination'])) {
-      $form_state['redirect'] = 'admin/people';
-    }
+    $form_state['redirect'] = 'admin/people';
   }
   else {
     // Store cancelling method and whether to notify the user in $account for
@@ -407,9 +405,7 @@ function user_cancel_confirm_form_submit
     drupal_set_message(t('A confirmation request to cancel your account has been sent to your e-mail address.'));
     watchdog('user', 'Sent account cancellation request to %name %email.', array('%name' => $account->name, '%email' => '<' . $account->mail . '>'), WATCHDOG_NOTICE);
 
-    if (!isset($_REQUEST['destination'])) {
-      $form_state['redirect'] = "user/$account->uid";
-    }
+    $form_state['redirect'] = "user/$account->uid";
   }
 }
 
