Skip to content

Commit

Permalink
Removed unnecessary regexp excecution in ft_termParser()
Browse files Browse the repository at this point in the history
  • Loading branch information
kazmiya authored and splitbrain committed Dec 13, 2010
1 parent 3559461 commit 6ac2077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/fulltext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6ac2077

Please sign in to comment.