diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-06-18 15:45:15 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-06-18 15:45:15 +0200 |
commit | 4efb9a42baed214da00a12a58c72586499dafc95 (patch) | |
tree | 649b9cdeb49f7c0ee3474b763f8aeabdd5d58dce /inc/indexer.php | |
parent | 377f9e9776677a6d3963718bfd48bba361571dfb (diff) | |
download | rpg-4efb9a42baed214da00a12a58c72586499dafc95.tar.gz rpg-4efb9a42baed214da00a12a58c72586499dafc95.tar.bz2 |
fixed stupid bug in search query parser
darcs-hash:20060618134515-7ad00-3097e310ccdaf793b5da3bd49a54723fea7ec260.gz
Diffstat (limited to 'inc/indexer.php')
-rw-r--r-- | inc/indexer.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/indexer.php b/inc/indexer.php index 789a98d91..4a5d0b4e2 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -357,14 +357,14 @@ function idx_parseIndexLine(&$page_idx,$line){ */ function idx_tokenizer($string,&$stopwords,$wc=false){ $words = array(); - if(!$wc) $wc = '\*'; + $wc = ($wc) ? '' : $wc = '\*'; if(preg_match('/[^0-9A-Za-z]/u', $string)){ // handle asian chars as single words (may fail on older PHP version) $asia = @preg_replace('/('.IDX_ASIAN.')/u','\1 ',$string); if(!is_null($asia)) $string = $asia; //recover from regexp failure - $arr = explode(' ', utf8_stripspecials($string,' ','._\-:'.$wc)); + $arr = explode(' ', utf8_stripspecials($string,' ','\._\-:'.$wc)); foreach ($arr as $w) { if (!is_numeric($w) && strlen($w) < 3) continue; $w = utf8_strtolower($w); |