Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
857082ce
Commit
857082ce
authored
Jan 11, 2005
by
Steven Wittens
Browse files
- Ensure word length <= 50 bytes
parent
854fa41f
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/search.module
View file @
857082ce
...
...
@@ -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.
*/
...
...
modules/search/search.module
View file @
857082ce
...
...
@@ -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.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment