r113394 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113393‎ | r113394 | r113395 >
Date:20:06, 8 March 2012
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 35014) Fix for r100529: including a special page no longer sets the page's title to the included page
Modified paths:
  • /branches/REL1_19/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /branches/REL1_19/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -11,6 +11,10 @@
1212 know what you think of it. Beta releases are not recommended for use in
1313 production.
1414
 15+=== Changes since 1.19 beta 1 ===
 16+* (bug 35014) Including a special page no longer sets the page's title to the
 17+ included page
 18+
1519 === Configuration changes in 1.19 ===
1620 * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead.
1721 * (bug 27132) movefile right granted by default to registered users.
Index: trunk/phase3/includes/OutputPage.php
@@ -3433,7 +3433,7 @@
34343434 * @param $args array
34353435 */
34363436 public function addWikiMsgArray( $name, $args ) {
3437 - $this->addWikiText( $this->msg( $name, $args )->plain() );
 3437+ $this->addHTML( $this->msg( $name, $args )->parseAsBlock() );
34383438 }
34393439
34403440 /**
Index: branches/REL1_19/phase3/RELEASE-NOTES-1.19
@@ -11,6 +11,10 @@
1212 know what you think of it. Beta releases are not recommended for use in
1313 production.
1414
 15+=== Changes since 1.19 beta 1 ===
 16+* (bug 35014) Including a special page no longer sets the page's title to the
 17+ included page
 18+
1519 === Configuration changes in 1.19 ===
1620 * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead.
1721 * (bug 27132) movefile right granted by default to registered users.
Index: branches/REL1_19/phase3/includes/OutputPage.php
@@ -3432,7 +3432,7 @@
34333433 * @param $args array
34343434 */
34353435 public function addWikiMsgArray( $name, $args ) {
3436 - $this->addWikiText( $this->msg( $name, $args )->plain() );
 3436+ $this->addHTML( $this->msg( $name, $args )->parseAsBlock() );
34373437 }
34383438
34393439 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r113935MFT r112918, r113214, r113394, r113415, r113617, r113710, r113727, r113737, r...reedy17:27, 15 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100529* Use local context to get messages...ialex08:13, 23 October 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   20:11, 13 March 2012

Is the commit summary here correct? How does this work?

#Comment by IAlex (talk | contribs)   20:38, 13 March 2012

Yes it is correct, sorry to not have been more explicit. The problem was that OutputPage::addWikiText() uses $wgParser for the parse operation and thus the ParserOutput is used for the both the parse of the article and the message. The title is set when calling OutputPage::addWikiText() inside the special page and get set in the ParserOutput used for the parse of the article which in turns will be used for the title of the display. Message::parseAsBlock() uses the Parser set in MessageCache and the conflict won't happen.

Status & tagging log