Merge "jquery.tablesorter: Improve detection and handling of isoDate"
[lhc/web/wiklou.git] / maintenance / renderDump.php
index eab5fe7..68a371c 100644 (file)
@@ -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 );
@@ -61,10 +62,10 @@ class DumpRenderer extends Maintenance {
                }
 
                $source = new ImportStreamSource( $this->getStdin() );
-               $importer = new WikiImporter( $source );
+               $importer = new WikiImporter( $source, $this->getConfig() );
 
                $importer->setRevisionCallback(
-                       array( &$this, 'handleRevision' ) );
+                       [ $this, 'handleRevision' ] );
 
                $importer->doImport();
 
@@ -78,12 +79,13 @@ class DumpRenderer extends Maintenance {
 
        /**
         * Callback function for each revision, turn into HTML and save
-        * @param $rev Revision
+        * @param Revision $rev
         */
        public function handleRevision( $rev ) {
                $title = $rev->getTitle();
                if ( !$title ) {
                        $this->error( "Got bogus revision with null title!" );
+
                        return;
                }
                $display = $title->getPrefixedText();