Merge "Revert "Log the reason why revision->getContent() returns null""
[lhc/web/wiklou.git] / maintenance / storage / checkStorage.php
index 6348e96..bd0556a 100644 (file)
@@ -65,7 +65,7 @@ class CheckStorage {
                } else {
                        print "Checking...\n";
                }
-               $maxRevId = $dbr->selectField( 'revision', 'MAX(rev_id)', false, __METHOD__ );
+               $maxRevId = $dbr->selectField( 'revision', 'MAX(rev_id)', '', __METHOD__ );
                $chunkSize = 1000;
                $flagStats = [];
                $objectStats = [];
@@ -493,6 +493,9 @@ class CheckStorage {
                        MediaWikiServices::getInstance()->getMainConfig()
                );
                $importer->setRevisionCallback( [ $this, 'importRevision' ] );
+               $importer->setNoticeCallback( function ( $msg, $params ) {
+                       echo wfMessage( $msg, $params )->text() . "\n";
+               } );
                $importer->doImport();
        }