Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git] / maintenance / importDump.php
index b6bbc2a..965906f 100644 (file)
@@ -145,6 +145,7 @@ TEXT
 
        /**
         * @param Title|Revision $obj
+        * @throws MWException
         * @return bool
         */
        private function skippedNamespace( $obj ) {
@@ -321,6 +322,9 @@ TEXT
                        $this->pageCount = $nthPage - 1;
                }
                $importer->setPageCallback( [ $this, 'reportPage' ] );
+               $importer->setNoticeCallback( function ( $msg, $params ) {
+                       echo wfMessage( $msg, $params )->text() . "\n";
+               } );
                $this->importCallback = $importer->setRevisionCallback(
                        [ $this, 'handleRevision' ] );
                $this->uploadCallback = $importer->setUploadCallback(
@@ -342,5 +346,5 @@ TEXT
        }
 }
 
-$maintClass = 'BackupReader';
+$maintClass = BackupReader::class;
 require_once RUN_MAINTENANCE_IF_MAIN;