Commit 7f164d98 authored by drumm's avatar drumm

#292565 second follow up by John Morahan: fix login destination again on...

#292565 second follow up by John Morahan: fix login destination again on 403/404 pages and make the search form work there if displayed
parent ea596730
......@@ -1052,6 +1052,17 @@ function search_box($form_id) {
* Process a block search form submission.
*/
function search_box_form_submit($form_id, $form_values) {
// 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']);
}
if (isset($_REQUEST['edit']['destination'])) {
unset($_REQUEST['edit']['destination']);
}
return 'search/node/'. trim($form_values[$form_id .'_keys']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment