X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2Fstorage%2FcheckStorage.php;h=f05be36481c2ddd12a28d050abfccdd04c28bebf;hp=6348e96b217fb95ef26aa963e7685ec10cb70b75;hb=8635864ed0dd388864cbe7d7e7f7f679256a8f4d;hpb=9c478b51e3b038b66d3825e6f112c158bea95b9e diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index 6348e96b21..f05be36481 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -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 = []; @@ -266,12 +266,12 @@ class CheckStorage { case 'historyblobcurstub': if ( strlen( $row->header ) == $headerLength ) { $this->addError( 'unfixable', "Error: overlong stub header", $oldId ); - continue; + break; } $stubObj = unserialize( $row->header ); if ( !is_object( $stubObj ) ) { $this->addError( 'restore text', "Error: unable to unserialize stub object", $oldId ); - continue; + break; } if ( $className == 'historyblobstub' ) { $concatBlobs[$stubObj->mOldId][] = $oldId; @@ -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(); }