From: Liangent Date: Thu, 18 Apr 2013 04:01:53 +0000 (+0800) Subject: Call $wgContLang->findVariantLink() in {{PAGESINCATEGORY: }} X-Git-Tag: 1.31.0-rc.0~18807^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=970cc1e8e68c2d2076c53c8a0f6e27e29ec5704f;p=lhc%2Fweb%2Fwiklou.git Call $wgContLang->findVariantLink() in {{PAGESINCATEGORY: }} Corrects inconsistent return value for number of pages in a category when language variants are in use. Change-Id: I27668ba348c45bc34b264f8771e91e58a9920552 --- diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 36bfb48770..dbafebae7e 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -577,6 +577,7 @@ class CoreParserFunctions { * @return string */ static function pagesincategory( $parser, $name = '', $arg1 = null, $arg2 = null ) { + global $wgContLang; static $magicWords = null; if ( is_null( $magicWords ) ) { $magicWords = new MagicWordArray( array( @@ -606,6 +607,7 @@ class CoreParserFunctions { if( !$title ) { # invalid title return self::formatRaw( 0, $raw ); } + $wgContLang->findVariantLink( $name, $title, true ); // Normalize name for cache $name = $title->getDBkey();