From 708f3b970fe756efb7395e54dff488fb8016b4dc Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 23 Jul 2009 20:58:26 +0000 Subject: #292565 follow-up by John Morahan: Restore ability to set 'user' as the 403/404 page. --- modules/search/search.module | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/search/search.module') diff --git a/modules/search/search.module b/modules/search/search.module index 1fd065536..479010d97 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -1116,6 +1116,14 @@ function search_box(&$form_state, $form_id) { * Process a block search form submission. */ function search_box_form_submit($form, &$form_state) { + // The search form relies on control of the redirect destination for its + // 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']); + } + $form_id = $form['form_id']['#value']; $form_state['redirect'] = 'search/node/' . trim($form_state['values'][$form_id]); } -- cgit v1.2.3