From 970cc1e8e68c2d2076c53c8a0f6e27e29ec5704f Mon Sep 17 00:00:00 2001 From: Liangent Date: Thu, 18 Apr 2013 12:01:53 +0800 Subject: [PATCH] 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 --- includes/parser/CoreParserFunctions.php | 2 ++ 1 file changed, 2 insertions(+) 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(); -- 2.20.1