Don't use $wgParser when {{int:}} is called, use $parser->replaceVariables() instead...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 15 Aug 2008 16:02:00 +0000 (16:02 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 15 Aug 2008 16:02:00 +0000 (16:02 +0000)
includes/parser/CoreParserFunctions.php

index cce00ab..8ae1e0a 100644 (file)
@@ -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 );
                }