Skip to content
Snippets Groups Projects
Commit 0a69b048 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#104662 by chx: the search block form might not be available on the search...

#104662 by chx: the search block form might not be available on the search page itself, so that target was not right for search block form submissions
parent 0cf66961
No related branches found
No related tags found
No related merge requests found
......@@ -949,9 +949,6 @@ function search_box(&$form_state, $form_id) {
'#attributes' => array('title' => t('Enter the terms you wish to search for.')),
);
$form['submit'] = array('#type' => 'submit', '#value' => t('Search'));
// Always go to the search page since the search form is not guaranteed to be
// on every page.
$form['#action'] = url('search/node');
$form['#submit'][] = 'search_box_form_submit';
$form['#validate'][] = 'search_box_form_validate';
......@@ -964,7 +961,6 @@ function search_box(&$form_state, $form_id) {
function search_box_form_submit($form, &$form_state) {
$form_id = $form['form_id']['#value'];
$form_state['redirect'] = 'search/node/'. trim($form_state['values'][$form_id .'_keys']);
return;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment