summaryrefslogtreecommitdiff
path: root/modules/search.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-01-11 04:50:00 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-01-11 04:50:00 +0000
commit857082ce7e9bec81287c6b356616ad41bcc225d6 (patch)
tree657fe1097bbb4f76fc2bf8b7c5d588b946d11a1a /modules/search.module
parent854fa41fb31f38329402274249414b2be2a372d9 (diff)
downloadbrdo-857082ce7e9bec81287c6b356616ad41bcc225d6.tar.gz
brdo-857082ce7e9bec81287c6b356616ad41bcc225d6.tar.bz2
- Ensure word length <= 50 bytes
Diffstat (limited to 'modules/search.module')
-rw-r--r--modules/search.module8
1 files changed, 8 insertions, 0 deletions
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;
@@ -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) {