From: Zheng Zhu Date: Thu, 28 Apr 2005 03:49:23 +0000 (+0000) Subject: Full conversion support for category pages X-Git-Tag: 1.5.0alpha1~93 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=e35d73c41223a39a7e34d7bb4e396c50303efc07;p=lhc%2Fweb%2Fwiklou.git Full conversion support for category pages --- diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 95c4fdbb3d..bb69b501b1 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -353,7 +353,10 @@ class LanguageConverter { static $cache=array(); global $wgDisableLangConversion; $pref = $this->getPreferredVariant(); - if( $count > 50 ) + $ns=0; + if(is_object($nt)) + $ns = $nt->getNamespace(); + if( $count > 50 && $ns != NS_CATEGORY ) return; $count++; $variants = $this->autoConvertToAllVariants($link); @@ -366,7 +369,7 @@ class LanguageConverter { $varnt = Title::newFromText( $v ); if( $varnt && $varnt->getArticleID() > 0 ) { $nt = $varnt; - if( !$wgDisableLangConversion && $pref != 'zh' ) + if( !$wgDisableLangConversion ) $link = $v; break; } @@ -598,6 +601,13 @@ class LanguageConverter { } /** + * convert the sorting key for category links. this should make different + * keys that are variants of each other map to the same key + */ + function convertCategoryKey( $key ) { + return $key; + } + /** * hook to refresh the cache of conversion tables when * MediaWiki:conversiontable* is updated * @access private