Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / maintenance / dumpIterator.php
index 254f368..e9a6bc5 100644 (file)
@@ -77,6 +77,9 @@ abstract class DumpIterator extends Maintenance {
 
                $importer->setRevisionCallback(
                        [ $this, 'handleRevision' ] );
+               $importer->setNoticeCallback( function ( $msg, $params ) {
+                       echo wfMessage( $msg, $params )->text() . "\n";
+               } );
 
                $this->from = $this->getOption( 'from', null );
                $this->count = 0;
@@ -102,7 +105,7 @@ abstract class DumpIterator extends Maintenance {
                if ( $this->getDbType() == Maintenance::DB_NONE ) {
                        global $wgUseDatabaseMessages, $wgLocalisationCacheConf, $wgHooks;
                        $wgUseDatabaseMessages = false;
-                       $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
+                       $wgLocalisationCacheConf['storeClass'] = LCStoreNull::class;
                        $wgHooks['InterwikiLoadPrefix'][] = 'DumpIterator::disableInterwikis';
                }
        }
@@ -182,5 +185,5 @@ class SearchDump extends DumpIterator {
        }
 }
 
-$maintClass = "SearchDump";
+$maintClass = SearchDump::class;
 require_once RUN_MAINTENANCE_IF_MAIN;