summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-09-10 07:56:06 +0000
committerDries Buytaert <dries@buytaert.net>2003-09-10 07:56:06 +0000
commit9b74d0b83cbbafc62a719e3a12d13f0240559c73 (patch)
treeeef1fae55bee56f3d147472fbbdaa144047f4c0a
parente406d3054ee1e5765bb57f10284d66ef070ca230 (diff)
downloadbrdo-9b74d0b83cbbafc62a719e3a12d13f0240559c73.tar.gz
brdo-9b74d0b83cbbafc62a719e3a12d13f0240559c73.tar.bz2
- Patch from Matt:
"The noise words description says that whitespace and line breaks will be stripped out, but the code never does any trimming. This simple patch strips the whitespace from the noise words. This probably takes care of bug #2804."
-rw-r--r--modules/search.module2
-rw-r--r--modules/search/search.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/search.module b/modules/search.module
index 462e32f1c..e7faea16a 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -270,7 +270,7 @@ function update_index($search_array) {
// Remove "noisewords"
$noise = explode(",", variable_get("noisewords", ""));
foreach ($noise as $word) {
- $wordlist = preg_replace("' $word '", " ", $wordlist);
+ $wordlist = str_replace(trim($word), " ", $wordlist);
}
// Remove whitespace
diff --git a/modules/search/search.module b/modules/search/search.module
index 462e32f1c..e7faea16a 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -270,7 +270,7 @@ function update_index($search_array) {
// Remove "noisewords"
$noise = explode(",", variable_get("noisewords", ""));
foreach ($noise as $word) {
- $wordlist = preg_replace("' $word '", " ", $wordlist);
+ $wordlist = str_replace(trim($word), " ", $wordlist);
}
// Remove whitespace