r39412 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39411‎ | r39412 | r39413 >
Date:16:02, 15 August 2008
Author:tstarling
Status:old (Comments)
Tags:
Comment:
Don't use $wgParser when {{int:}} is called, use $parser->replaceVariables() instead. Removes an unnecessary potential $wgTitle reference, and fixes Parser_DiffTest.
Modified paths:
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -56,7 +56,10 @@
5757 static function intFunction( $parser, $part1 = '' /*, ... */ ) {
5858 if ( strval( $part1 ) !== '' ) {
5959 $args = array_slice( func_get_args(), 2 );
60 - return wfMsgReal( $part1, $args, true );
 60+ $message = wfMsgGetKey( $part1, true, false, false );
 61+ $message = $parser->replaceVariables( $message ); // like $wgMessageCache->transform()
 62+ $message = wfMsgReplaceArgs( $message, $args );
 63+ return $message;
6164 } else {
6265 return array( 'found' => false );
6366 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r39414* In the parser: do link existence tests in batches of 1000. Avoids using exc...tstarling16:35, 15 August 2008

Comments

#Comment by Platonides (talk | contribs)   22:54, 29 October 2011

This bug introduced bug 31098, fixed in r101291

Status & tagging log