- Ensure word length <= 50 bytes

4.6.x
Steven Wittens 2005-01-11 04:50:00 +00:00
parent 854fa41fb3
commit 857082ce7e
2 changed files with 16 additions and 0 deletions

View File

@ -236,6 +236,7 @@ function search_keywords_split($text) {
// Process words
$words = explode(' ', $text);
array_walk($words, '_search_keywords_truncate');
// Save last keyword result
$last = $text;
@ -244,6 +245,13 @@ function search_keywords_split($text) {
return $words;
}
/**
* Helper function for array_walk in search_keywords_split.
*/
function _search_keywords_truncate(&$text) {
$text = truncate_utf8($text, 3);
}
/**
* Invokes hook_search_preprocess() in modules.
*/

View File

@ -236,6 +236,7 @@ function search_keywords_split($text) {
// Process words
$words = explode(' ', $text);
array_walk($words, '_search_keywords_truncate');
// Save last keyword result
$last = $text;
@ -244,6 +245,13 @@ function search_keywords_split($text) {
return $words;
}
/**
* Helper function for array_walk in search_keywords_split.
*/
function _search_keywords_truncate(&$text) {
$text = truncate_utf8($text, 3);
}
/**
* Invokes hook_search_preprocess() in modules.
*/