diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-11 04:50:00 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-11 04:50:00 +0000 |
commit | 857082ce7e9bec81287c6b356616ad41bcc225d6 (patch) | |
tree | 657fe1097bbb4f76fc2bf8b7c5d588b946d11a1a /modules/search | |
parent | 854fa41fb31f38329402274249414b2be2a372d9 (diff) | |
download | brdo-857082ce7e9bec81287c6b356616ad41bcc225d6.tar.gz brdo-857082ce7e9bec81287c6b356616ad41bcc225d6.tar.bz2 |
- Ensure word length <= 50 bytes
Diffstat (limited to 'modules/search')
-rw-r--r-- | modules/search/search.module | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/search/search.module b/modules/search/search.module index d8586d5db..0d3fca652 100644 --- a/modules/search/search.module +++ b/modules/search/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; @@ -245,6 +246,13 @@ function search_keywords_split($text) { } /** + * 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. */ function search_preprocess(&$text) { |