r63637 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63636‎ | r63637 | r63638 >
Date:18:22, 12 March 2010
Author:tstarling
Status:ok
Tags:
Comment:
Revert r61856, r63457, experimental changes not suitable for immediate release. See CR on r61856.
Modified paths:
  • /branches/REL1_16/phase3/includes/search/SearchEngine.php (modified) (history)
  • /branches/REL1_16/phase3/includes/search/SearchMySQL.php (modified) (history)
  • /branches/REL1_16/phase3/includes/search/SearchUpdate.php (modified) (history)
  • /branches/REL1_16/phase3/languages/classes/LanguageZh_hans.php (modified) (history)

Diff [purge]

Index: branches/REL1_16/phase3/includes/search/SearchEngine.php
@@ -56,10 +56,7 @@
5757 * @return string
5858 */
5959 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;
6461 }
6562
6663 /**
Index: branches/REL1_16/phase3/includes/search/SearchMySQL.php
@@ -325,7 +325,8 @@
326326
327327 wfProfileIn( __METHOD__ );
328328
329 - $out = parent::normalizeText( $string );
 329+ // Some languages such as Chinese require word segmentation
 330+ $out = $wgContLang->wordSegmentation( $string );
330331
331332 // MySQL fulltext index doesn't grok utf-8, so we
332333 // need to fold cases and convert to hex
Index: branches/REL1_16/phase3/includes/search/SearchUpdate.php
@@ -37,7 +37,7 @@
3838
3939 if( $this->mText === false ) {
4040 $search->updateTitle($this->mId,
41 - $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) );
 41+ Title::indexTitle( $this->mNamespace, $this->mTitle ));
4242 wfProfileOut( $fname );
4343 return;
4444 }
@@ -97,8 +97,8 @@
9898 wfRunHooks( 'SearchUpdate', array( $this->mId, $this->mNamespace, $this->mTitle, &$text ) );
9999
100100 # 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);
103103
104104 wfProfileOut( $fname );
105105 }
Index: branches/REL1_16/phase3/languages/classes/LanguageZh_hans.php
@@ -25,7 +25,6 @@
2626 // Double-width roman characters
2727 $s = self::convertDoubleWidth( $string );
2828 $s = trim( $s );
29 - $s = self::wordSegmentation( $s );
3029 $s = parent::normalizeForSearch( $s );
3130
3231 wfProfileOut( __METHOD__ );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61856Follow up r60742, r60743, r60764, r60766, r61214, r61390. Split stripForSearc...philip15:09, 2 February 2010
r63457follow up r63456 remove extra line.mah04:14, 9 March 2010

Status & tagging log