Index: branches/REL1_16/phase3/includes/search/SearchEngine.php |
— | — | @@ -56,10 +56,7 @@ |
57 | 57 | * @return string |
58 | 58 | */ |
59 | 59 | public function normalizeText( $string ) { |
60 | | - global $wgContLang; |
61 | | - |
62 | | - // Some languages such as Chinese require word segmentation |
63 | | - return $wgContLang->wordSegmentation( $string ); |
| 60 | + return $string; |
64 | 61 | } |
65 | 62 | |
66 | 63 | /** |
Index: branches/REL1_16/phase3/includes/search/SearchMySQL.php |
— | — | @@ -325,7 +325,8 @@ |
326 | 326 | |
327 | 327 | wfProfileIn( __METHOD__ ); |
328 | 328 | |
329 | | - $out = parent::normalizeText( $string ); |
| 329 | + // Some languages such as Chinese require word segmentation |
| 330 | + $out = $wgContLang->wordSegmentation( $string ); |
330 | 331 | |
331 | 332 | // MySQL fulltext index doesn't grok utf-8, so we |
332 | 333 | // need to fold cases and convert to hex |
Index: branches/REL1_16/phase3/includes/search/SearchUpdate.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | |
39 | 39 | if( $this->mText === false ) { |
40 | 40 | $search->updateTitle($this->mId, |
41 | | - $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) ); |
| 41 | + Title::indexTitle( $this->mNamespace, $this->mTitle )); |
42 | 42 | wfProfileOut( $fname ); |
43 | 43 | return; |
44 | 44 | } |
— | — | @@ -97,8 +97,8 @@ |
98 | 98 | wfRunHooks( 'SearchUpdate', array( $this->mId, $this->mNamespace, $this->mTitle, &$text ) ); |
99 | 99 | |
100 | 100 | # Perform the actual update |
101 | | - $search->update($this->mId, $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ), |
102 | | - $search->normalizeText( $text ) ); |
| 101 | + $search->update($this->mId, Title::indexTitle( $this->mNamespace, $this->mTitle ), |
| 102 | + $text); |
103 | 103 | |
104 | 104 | wfProfileOut( $fname ); |
105 | 105 | } |
Index: branches/REL1_16/phase3/languages/classes/LanguageZh_hans.php |
— | — | @@ -25,7 +25,6 @@ |
26 | 26 | // Double-width roman characters |
27 | 27 | $s = self::convertDoubleWidth( $string ); |
28 | 28 | $s = trim( $s ); |
29 | | - $s = self::wordSegmentation( $s ); |
30 | 29 | $s = parent::normalizeForSearch( $s ); |
31 | 30 | |
32 | 31 | wfProfileOut( __METHOD__ ); |