X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FrenderDump.php;h=458556ffce7c2380d7c95fa367edf81e1cb3172d;hp=2218a5e7a3e247ed6836e67ad69dae0b807c67a3;hb=dbad540cd37617879aff6f28ce9c016dd8049d4e;hpb=31d239f9d9e2516fc725d9b743ece0dfe72c23a2 diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php index 2218a5e7a3..458556ffce 100644 --- a/maintenance/renderDump.php +++ b/maintenance/renderDump.php @@ -43,7 +43,8 @@ class DumpRenderer extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Take page text out of an XML dump file and render basic HTML out to files"; + $this->addDescription( + 'Take page text out of an XML dump file and render basic HTML out to files' ); $this->addOption( 'output-dir', 'The directory to output the HTML files to', true, true ); $this->addOption( 'prefix', 'Prefix for the rendered files (defaults to wiki)', false, true ); $this->addOption( 'parser', 'Use an alternative parser class', false, true ); @@ -64,7 +65,10 @@ class DumpRenderer extends Maintenance { $importer = new WikiImporter( $source, $this->getConfig() ); $importer->setRevisionCallback( - array( &$this, 'handleRevision' ) ); + [ $this, 'handleRevision' ] ); + $importer->setNoticeCallback( function ( $msg, $params ) { + echo wfMessage( $msg, $params )->text() . "\n"; + } ); $importer->doImport();