r84341 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84340‎ | r84341 | r84342 >
Date:17:59, 19 March 2011
Author:tbleher
Status:ok
Tags:
Comment:
DumpHTML: Set title object properly in $wgOut and $sk

This fixes the bug that the article and talk tabs always contained the link
to the first article that had been processed.
Modified paths:
  • /trunk/extensions/DumpHTML/dumpHTML.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/DumpHTML/dumpHTML.inc
@@ -494,11 +494,11 @@
495495 # Do raw pages
496496 $this->mkdir( "{$this->dest}/raw", 0755 );
497497 foreach( $this->rawPages as $record ) {
498 - list( $file, $title, $params ) = $record;
 498+ list( $file, $ftitle, $params ) = $record;
499499
500500 $path = "{$this->dest}/raw/$file";
501501 if ( !file_exists( $path ) ) {
502 - $article = new Article( $title );
 502+ $article = new Article( $ftitle );
503503 $request = new FauxRequest( $params );
504504 $rp = new RawPage( $article, $request );
505505 $text = $rp->getRawText();
@@ -797,6 +797,7 @@
798798 if ( $ns == NS_SPECIAL ) {
799799 $wgOut = new OutputPage;
800800 $wgOut->parserOptions( new ParserOptions );
 801+ $wgOut->setTitle( $title );
801802 SpecialPage::executePath( $wgTitle );
802803 } else {
803804 $article = MediaWiki::articleFromTitle( $wgTitle );
@@ -806,6 +807,7 @@
807808 } else {
808809 $wgOut = new OutputPage;
809810 $wgOut->parserOptions( new ParserOptions );
 811+ $wgOut->setTitle( $title );
810812
811813 $article->view();
812814 }
@@ -813,6 +815,7 @@
814816
815817
816818 $sk = $wgUser->getSkin();
 819+ $sk->setTitle( $title );
817820 ob_start();
818821 $sk->outputPage( $wgOut );
819822 $text = ob_get_contents();

Status & tagging log