summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorKazutaka Miyasaka <kazmiya@gmail.com>2010-12-14 01:38:54 +0900
committerAndreas Gohr <andi@splitbrain.org>2010-12-13 19:02:41 +0100
commit6ac2077a96f206f26714699c001c72f914bf7970 (patch)
tree79c74339a74df152dbf6774e0ca4be73a48f2e00 /inc
parent35594613ea01a868e958663dc211bce021df23f4 (diff)
downloadrpg-6ac2077a96f206f26714699c001c72f914bf7970.tar.gz
rpg-6ac2077a96f206f26714699c001c72f914bf7970.tar.bz2
Removed unnecessary regexp excecution in ft_termParser()
Diffstat (limited to 'inc')
-rw-r--r--inc/fulltext.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php
index 457ad1baf..be3938cac 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -739,7 +739,7 @@ function ft_termParser($term, &$stopwords, $consider_asian = true, $phrase_mode
// successive asian characters need to be searched as a phrase
$words = preg_split('/('.IDX_ASIAN.'+)/u', $term, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
foreach ($words as $word) {
- if (preg_match('/'.IDX_ASIAN.'/u', $word)) $phrase_mode = true;
+ $phrase_mode = $phrase_mode ? true : preg_match('/'.IDX_ASIAN.'/u', $word);
$parsed .= ft_termParser($word, $stopwords, false, $phrase_mode);
}
} else {