r68030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68029‎ | r68030 | r68031 >
Date:20:39, 14 June 2010
Author:aaron
Status:deferred (Comments)
Tags:
Comment:
Make sure displaytitle is applied stable versions. Apparently this wasn't noticed before :)
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -512,7 +512,7 @@
513513 if ( $redirHtml != '' ) {
514514 $wgOut->addHtml( $redirHtml );
515515 } else {
516 - $wgOut->addParserOutput( $parserOut );
 516+ $this->addParserOutput( $parserOut );
517517 }
518518 }
519519
@@ -600,10 +600,22 @@
601601 $wgOut->addHtml( $redirHtml );
602602 } else {
603603 // $parserOut will not be null here
604 - $wgOut->addParserOutput( $parserOut );
 604+ $this->addParserOutput( $parserOut );
605605 }
606606 }
607607
 608+ // Add parser output and update title
 609+ // @TODO: refactor MW core to move this back
 610+ protected function addParserOutput( ParserOutput $parserOut ) {
 611+ global $wgOut;
 612+ $wgOut->addParserOutput( $parserOut );
 613+ # Adjust the title if it was set by displaytitle, -{T|}- or language conversion
 614+ $titleText = $parserOut->getTitleText();
 615+ if ( strval( $titleText ) !== '' ) {
 616+ $wgOut->setPageTitle( $titleText );
 617+ }
 618+ }
 619+
608620 // Get fancy redirect arrow and link HTML
609621 protected function getRedirectHtml( $text ) {
610622 $rTarget = $this->article->followRedirectText( $text );

Comments

#Comment by TheDJ (talk | contribs)   00:52, 23 July 2010

This corresponded to bug 23891

Status & tagging log