From 6ac2077a96f206f26714699c001c72f914bf7970 Mon Sep 17 00:00:00 2001 From: Kazutaka Miyasaka <kazmiya@gmail.com> Date: Tue, 14 Dec 2010 01:38:54 +0900 Subject: [PATCH] Removed unnecessary regexp excecution in ft_termParser() --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- GitLab