From 857082ce7e9bec81287c6b356616ad41bcc225d6 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 11 Jan 2005 04:50:00 +0000 Subject: - Ensure word length <= 50 bytes --- modules/search.module | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/search.module') diff --git a/modules/search.module b/modules/search.module index d8586d5db..0d3fca652 100644 --- a/modules/search.module +++ b/modules/search.module @@ -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. */ -- cgit v1.2.3