Index: trunk/phase3/includes/search/SearchEngine.php |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | $allSearchTerms = array( $searchterm ); |
110 | 110 | |
111 | 111 | if ( $wgContLang->hasVariants() ) { |
112 | | - $allSearchTerms = array_merge( $allSearchTerms, $wgContLang->convertLinkToAllVariants( $searchterm ) ); |
| 112 | + $allSearchTerms = array_merge( $allSearchTerms, $wgContLang->autoConvertToAllVariants( $searchterm ) ); |
113 | 113 | } |
114 | 114 | |
115 | 115 | if ( !wfRunHooks( 'SearchGetNearMatchBefore', array( $allSearchTerms, &$titleResult ) ) ) { |
Index: trunk/phase3/includes/parser/LinkHolderArray.php |
— | — | @@ -330,7 +330,7 @@ |
331 | 331 | } |
332 | 332 | |
333 | 333 | // Now do the conversion and explode string to text of titles |
334 | | - $titlesAllVariants = $wgContLang->convertLinkToAllVariants( $titlesToBeConverted ); |
| 334 | + $titlesAllVariants = $wgContLang->autoConvertToAllVariants( $titlesToBeConverted ); |
335 | 335 | $allVariantsName = array_keys( $titlesAllVariants ); |
336 | 336 | foreach ( $titlesAllVariants as &$titlesVariant ) { |
337 | 337 | $titlesVariant = explode( "\0", $titlesVariant ); |
— | — | @@ -354,7 +354,7 @@ |
355 | 355 | $categoryMap = array(); // maps $category_variant => $category (dbkeys) |
356 | 356 | $varCategories = array(); // category replacements oldDBkey => newDBkey |
357 | 357 | foreach( $output->getCategoryLinks() as $category ){ |
358 | | - $variants = $wgContLang->convertLinkToAllVariants( $category ); |
| 358 | + $variants = $wgContLang->autoConvertToAllVariants( $category ); |
359 | 359 | foreach($variants as $variant){ |
360 | 360 | if($variant != $category){ |
361 | 361 | $variantTitle = Title::newFromDBkey( Title::makeName(NS_CATEGORY,$variant) ); |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -1686,7 +1686,7 @@ |
1687 | 1687 | } |
1688 | 1688 | |
1689 | 1689 | if ( $wgContLang->hasVariants() ) { |
1690 | | - $selflink = $wgContLang->convertLinkToAllVariants( $this->mTitle->getPrefixedText() ); |
| 1690 | + $selflink = $wgContLang->autoConvertToAllVariants( $this->mTitle->getPrefixedText() ); |
1691 | 1691 | } else { |
1692 | 1692 | $selflink = array( $this->mTitle->getPrefixedText() ); |
1693 | 1693 | } |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | class FakeConverter { |
41 | 41 | var $mLang; |
42 | 42 | function FakeConverter( $langobj ) { $this->mLang = $langobj; } |
43 | | - function autoConvertToAllVariants( $text ) { return $text; } |
| 43 | + function autoConvertToAllVariants( $text ) { return array( $this->mLang->getCode() => $text ); } |
44 | 44 | function convert( $t ) { return $t; } |
45 | 45 | function convertTitle( $t ) { return $t->getPrefixedText(); } |
46 | 46 | function getVariants() { return array( $this->mLang->getCode() ); } |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | function getParsedTitle() { return ''; } |
52 | 52 | function markNoConversion( $text, $noParse = false ) { return $text; } |
53 | 53 | function convertCategoryKey( $key ) { return $key; } |
54 | | - function convertLinkToAllVariants( $text ) { return array( $this->mLang->getCode() => $text ); } |
| 54 | + function convertLinkToAllVariants( $text ) { return autoConvertToAllVariants( $text ); } |
55 | 55 | function armourMath( $text ) { return $text; } |
56 | 56 | } |
57 | 57 | |