Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
8b046194
Commit
8b046194
authored
Dec 18, 2005
by
Steven Wittens
Browse files
- Fix minimum_word_size default values
parent
0dfc8e05
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/search.module
View file @
8b046194
...
...
@@ -436,7 +436,7 @@ function search_preprocess(&$text) {
* @ingroup search
*/
function
search_index
(
$sid
,
$type
,
$text
)
{
$minimum_word_size
=
variable_get
(
'minimum_word_size'
,
4
);
$minimum_word_size
=
variable_get
(
'minimum_word_size'
,
3
);
// Link matching
global
$base_url
;
...
...
@@ -726,7 +726,7 @@ function _search_parse_query(&$word, &$scores, $not = false) {
$split
=
explode
(
' '
,
$word
);
foreach
(
$split
as
$s
)
{
$num
=
is_numeric
(
$s
);
if
(
$num
||
drupal_strlen
(
$s
)
>=
variable_get
(
'minimum_word_size'
,
4
))
{
if
(
$num
||
drupal_strlen
(
$s
)
>=
variable_get
(
'minimum_word_size'
,
3
))
{
$scores
[]
=
$num
?
((
int
)
ltrim
(
$word
,
'-0'
))
:
$s
;
}
}
...
...
modules/search/search.module
View file @
8b046194
...
...
@@ -436,7 +436,7 @@ function search_preprocess(&$text) {
* @ingroup search
*/
function
search_index
(
$sid
,
$type
,
$text
)
{
$minimum_word_size
=
variable_get
(
'minimum_word_size'
,
4
);
$minimum_word_size
=
variable_get
(
'minimum_word_size'
,
3
);
// Link matching
global
$base_url
;
...
...
@@ -726,7 +726,7 @@ function _search_parse_query(&$word, &$scores, $not = false) {
$split
=
explode
(
' '
,
$word
);
foreach
(
$split
as
$s
)
{
$num
=
is_numeric
(
$s
);
if
(
$num
||
drupal_strlen
(
$s
)
>=
variable_get
(
'minimum_word_size'
,
4
))
{
if
(
$num
||
drupal_strlen
(
$s
)
>=
variable_get
(
'minimum_word_size'
,
3
))
{
$scores
[]
=
$num
?
((
int
)
ltrim
(
$word
,
'-0'
))
:
$s
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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