- Noiseword fix. Patch by Matt. Reported by Bart.
parent
9b74d0b83c
commit
ad5fb6cd6d
|
@ -270,7 +270,8 @@ function update_index($search_array) {
|
||||||
// Remove "noisewords"
|
// Remove "noisewords"
|
||||||
$noise = explode(",", variable_get("noisewords", ""));
|
$noise = explode(",", variable_get("noisewords", ""));
|
||||||
foreach ($noise as $word) {
|
foreach ($noise as $word) {
|
||||||
$wordlist = str_replace(trim($word), " ", $wordlist);
|
$word = trim($word);
|
||||||
|
$wordlist = trim(preg_replace("' $word '", " ", " " .$wordlist. " "));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove whitespace
|
// Remove whitespace
|
||||||
|
|
|
@ -270,7 +270,8 @@ function update_index($search_array) {
|
||||||
// Remove "noisewords"
|
// Remove "noisewords"
|
||||||
$noise = explode(",", variable_get("noisewords", ""));
|
$noise = explode(",", variable_get("noisewords", ""));
|
||||||
foreach ($noise as $word) {
|
foreach ($noise as $word) {
|
||||||
$wordlist = str_replace(trim($word), " ", $wordlist);
|
$word = trim($word);
|
||||||
|
$wordlist = trim(preg_replace("' $word '", " ", " " .$wordlist. " "));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove whitespace
|
// Remove whitespace
|
||||||
|
|
Loading…
Reference in New Issue