diff options
Diffstat (limited to 'inc')
-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); |