summaryrefslogtreecommitdiff
path: root/modules/search
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-23 20:58:26 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-23 20:58:26 +0000
commit708f3b970fe756efb7395e54dff488fb8016b4dc (patch)
tree6dc9da5aa362015f1660c4351335567df0649e85 /modules/search
parent3295866fad4b63dc8b937dc5b5aa481af22db2c3 (diff)
downloadbrdo-708f3b970fe756efb7395e54dff488fb8016b4dc.tar.gz
brdo-708f3b970fe756efb7395e54dff488fb8016b4dc.tar.bz2
#292565 follow-up by John Morahan: Restore ability to set 'user' as the 403/404 page.
Diffstat (limited to 'modules/search')
-rw-r--r--modules/search/search.module8
1 files changed, 8 insertions, 0 deletions
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]);
}