- Noiseword fix. Patch by Matt. Reported by Bart.

4.3.x
Dries Buytaert 2003-09-10 16:48:00 +00:00
parent 9b74d0b83c
commit ad5fb6cd6d
2 changed files with 4 additions and 2 deletions

View File

@ -270,7 +270,8 @@ function update_index($search_array) {
// Remove "noisewords"
$noise = explode(",", variable_get("noisewords", ""));
foreach ($noise as $word) {
$wordlist = str_replace(trim($word), " ", $wordlist);
$word = trim($word);
$wordlist = trim(preg_replace("' $word '", " ", " " .$wordlist. " "));
}
// Remove whitespace

View File

@ -270,7 +270,8 @@ function update_index($search_array) {
// Remove "noisewords"
$noise = explode(",", variable_get("noisewords", ""));
foreach ($noise as $word) {
$wordlist = str_replace(trim($word), " ", $wordlist);
$word = trim($word);
$wordlist = trim(preg_replace("' $word '", " ", " " .$wordlist. " "));
}
// Remove whitespace