Index: trunk/phase3/tests/phpunit/includes/ExtraParserTest.php |
— | — | @@ -43,13 +43,11 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | function testPreSaveTransform() { |
47 | | - global $wgUser, $wgTitle; |
| 47 | + global $wgUser; |
48 | 48 | $title = Title::newFromText( __FUNCTION__ ); |
49 | | - $oldTitle = $wgTitle; $wgTitle = $title; # Used by transformMsg() |
50 | 49 | $outputText = $this->parser->preSaveTransform( "Test\r\n{{subst:Foo}}\n{{Bar}}", $title, $wgUser, $this->options ); |
51 | 50 | |
52 | 51 | $this->assertEquals( "Test\nContent of ''Template:Foo''\n{{Bar}}", $outputText ); |
53 | | - $wgTitle = $oldTitle; |
54 | 52 | } |
55 | 53 | |
56 | 54 | function testPreprocess() { |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -4383,11 +4383,9 @@ |
4384 | 4384 | # If we're still here, make it a link to the user page |
4385 | 4385 | $userText = wfEscapeWikiText( $username ); |
4386 | 4386 | $nickText = wfEscapeWikiText( $nickname ); |
4387 | | - if ( $user->isAnon() ) { |
4388 | | - return wfMsgExt( 'signature-anon', array( 'content', 'parsemag' ), $userText, $nickText ); |
4389 | | - } else { |
4390 | | - return wfMsgExt( 'signature', array( 'content', 'parsemag' ), $userText, $nickText ); |
4391 | | - } |
| 4387 | + $msgName = $user->isAnon() ? 'signature-anon' : 'signature'; |
| 4388 | + |
| 4389 | + return wfMessage( $msgName, $userText, $nickText )->inContentLanguage()->title( $this->getTitle() )->text(); |
4392 | 4390 | } |
4393 | 4391 | |
4394 | 4392 | /** |