summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorKazutaka Miyasaka <kazmiya@gmail.com>2010-12-14 01:52:20 +0900
committerAndreas Gohr <andi@splitbrain.org>2010-12-13 19:02:21 +0100
commit35594613ea01a868e958663dc211bce021df23f4 (patch)
treeac7b512f7c942f5d191b28b20b284d60de60da64 /inc
parentec5906e60bfe61520ec062e6a89096988c218690 (diff)
downloadrpg-35594613ea01a868e958663dc211bce021df23f4.tar.gz
rpg-35594613ea01a868e958663dc211bce021df23f4.tar.bz2
Fixed Asian search term handling in ft_snippet_re_preprocess()
Diffstat (limited to 'inc')
-rw-r--r--inc/fulltext.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php
index 59a9c1d96..457ad1baf 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -396,6 +396,11 @@ function ft_snippet($id,$highlight){
* Wraps a search term in regex boundary checks.
*/
function ft_snippet_re_preprocess($term) {
+ // do not process asian terms where word boundaries are not explicit
+ if(preg_match('/'.IDX_ASIAN.'/u',$term)){
+ return $term;
+ }
+
if(substr($term,0,2) == '\\*'){
$term = substr($term,2);
}else{