From db6aa1a61420773432d9262a8c8639e2760e8b92 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 15 Aug 2008 16:02:00 +0000 Subject: [PATCH] Don't use $wgParser when {{int:}} is called, use $parser->replaceVariables() instead. Removes an unnecessary potential $wgTitle reference, and fixes Parser_DiffTest. --- includes/parser/CoreParserFunctions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ); } -- 2.20.1