X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportDump.php;h=965906f2292a1395e529cc8d271f4af5316c5466;hb=99e8325cc16fb769fcc3c7a66089d6d5c1928862;hp=b6bbc2a6d60009ac288fdd1d5e78eb7276a8b301;hpb=da13e914c0502512f39922f6a53a017ccdebbe38;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importDump.php b/maintenance/importDump.php index b6bbc2a6d6..965906f229 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -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;