X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FrenderDump.php;h=2039a21603e860606fe134c852b63e11bdd55293;hb=a6d2365015aaa4b26729492cdc25f1a69920b2f6;hp=24bedfa4b4166e1e6f182cc0d211f9d07a187ab8;hpb=abbaf76c9a7e1ce8cba6aa52e9ee5b0a92d908e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php index 24bedfa4b4..2039a21603 100644 --- a/maintenance/renderDump.php +++ b/maintenance/renderDump.php @@ -69,9 +69,10 @@ class DumpRenderer extends Maintenance { $importer->doImport(); $delta = microtime( true ) - $this->startTime; - $this->error( "Rendered {$this->count} pages in " . round($delta, 2) . " seconds " ); - if ($delta > 0) - $this->error( round($this->count / $delta, 2) . " pages/sec" ); + $this->error( "Rendered {$this->count} pages in " . round( $delta, 2 ) . " seconds " ); + if ( $delta > 0 ) { + $this->error( round( $this->count / $delta, 2 ) . " pages/sec" ); + } $this->error( "\n" ); } @@ -80,8 +81,6 @@ class DumpRenderer extends Maintenance { * @param $rev Revision */ public function handleRevision( $rev ) { - global $wgParserConf; - $title = $rev->getTitle(); if ( !$title ) { $this->error( "Got bogus revision with null title!" ); @@ -100,10 +99,10 @@ class DumpRenderer extends Maintenance { $this->output( sprintf( "%s\n", $filename, $display ) ); $user = new User(); - $parser = new $wgParserConf['class'](); $options = ParserOptions::newFromUser( $user ); - $output = $parser->parse( $rev->getText(), $title, $options ); + $content = $rev->getContent(); + $output = $content->getParserOutput( $title, null, $options ); file_put_contents( $filename, "