Commit c4b031f3 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#56911, advanced search broken, patch by Zen.

parent 3a84ed2a
......@@ -2164,9 +2164,9 @@ function node_form_alter($form_id, &$form) {
/**
* Form API callback for the search form. Registered in node_form_alter().
*/
function node_search_validate($form_id, $form_values) {
function node_search_validate($form_id, $form_values, $form) {
// Initialise using any existing basic search keywords.
$keys = $form_values['processed_keys']['#ref'];
$keys = $form['basic']['inline']['processed_keys']['#ref'];
// Insert extra restrictions into the search keywords string.
if (isset($form_values['type']) && is_array($form_values['type'])) {
......@@ -2193,7 +2193,7 @@ function node_search_validate($form_id, $form_values) {
$keys .= ' "'. str_replace('"', ' ', $form_values['phrase']) .'"';
}
if (!empty($keys)) {
$form_values['processed_keys']['#ref'] = trim($keys);
$form['basic']['inline']['processed_keys']['#ref'] = trim($keys);
}
}
......
......@@ -2164,9 +2164,9 @@ function node_form_alter($form_id, &$form) {
/**
* Form API callback for the search form. Registered in node_form_alter().
*/
function node_search_validate($form_id, $form_values) {
function node_search_validate($form_id, $form_values, $form) {
// Initialise using any existing basic search keywords.
$keys = $form_values['processed_keys']['#ref'];
$keys = $form['basic']['inline']['processed_keys']['#ref'];
// Insert extra restrictions into the search keywords string.
if (isset($form_values['type']) && is_array($form_values['type'])) {
......@@ -2193,7 +2193,7 @@ function node_search_validate($form_id, $form_values) {
$keys .= ' "'. str_replace('"', ' ', $form_values['phrase']) .'"';
}
if (!empty($keys)) {
$form_values['processed_keys']['#ref'] = trim($keys);
$form['basic']['inline']['processed_keys']['#ref'] = trim($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