| 1 |
<?php |
<?php |
| 2 |
// $Id: search.module,v 1.209.2.5 2007/07/26 19:16:48 drumm Exp $ |
// $Id: search.module,v 1.209.2.6 2008/05/14 06:35:29 drumm Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 1052 |
* Process a block search form submission. |
* Process a block search form submission. |
| 1053 |
*/ |
*/ |
| 1054 |
function search_box_form_submit($form_id, $form_values) { |
function search_box_form_submit($form_id, $form_values) { |
| 1055 |
|
// The search form relies on control of the redirect destination for its |
| 1056 |
|
// functionality, so we override any static destination set in the request, |
| 1057 |
|
// for example by drupal_access_denied() or drupal_not_found() |
| 1058 |
|
// (see http://drupal.org/node/292565). |
| 1059 |
|
if (isset($_REQUEST['destination'])) { |
| 1060 |
|
unset($_REQUEST['destination']); |
| 1061 |
|
} |
| 1062 |
|
if (isset($_REQUEST['edit']['destination'])) { |
| 1063 |
|
unset($_REQUEST['edit']['destination']); |
| 1064 |
|
} |
| 1065 |
|
|
| 1066 |
return 'search/node/'. trim($form_values[$form_id .'_keys']); |
return 'search/node/'. trim($form_values[$form_id .'_keys']); |
| 1067 |
} |
} |
| 1068 |
|
|