From: Tim Starling Date: Fri, 15 Aug 2008 16:02:00 +0000 (+0000) Subject: Don't use $wgParser when {{int:}} is called, use $parser->replaceVariables() instead... X-Git-Tag: 1.31.0-rc.0~45889 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=db6aa1a61420773432d9262a8c8639e2760e8b92;p=lhc%2Fweb%2Fwiklou.git Don't use $wgParser when {{int:}} is called, use $parser->replaceVariables() instead. Removes an unnecessary potential $wgTitle reference, and fixes Parser_DiffTest. --- diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index cce00ab32c..8ae1e0a07b 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -56,7 +56,10 @@ class CoreParserFunctions { static function intFunction( $parser, $part1 = '' /*, ... */ ) { if ( strval( $part1 ) !== '' ) { $args = array_slice( func_get_args(), 2 ); - return wfMsgReal( $part1, $args, true ); + $message = wfMsgGetKey( $part1, true, false, false ); + $message = $parser->replaceVariables( $message ); // like $wgMessageCache->transform() + $message = wfMsgReplaceArgs( $message, $args ); + return $message; } else { return array( 'found' => false ); }