40 $res = FileSelectQueryBuilder::newForFile( $dbr )
41 ->where( $dbr->expr(
'img_name',
'>', $start ) )
43 ->orderBy(
'img_name', SelectQueryBuilder::SORT_ASC )
44 ->caller( __METHOD__ )
46 foreach ( $res as $row ) {
48 $start = $row->img_name;
49 $file = $repo->newFileFromRow( $row );
50 $path = $file->getPath();
52 $this->
output(
"{$row->img_name}: not locally accessible\n" );
55 $size = $repo->getFileSize( $file->getPath() );
56 if ( $size ===
false ) {
57 $this->
output(
"{$row->img_name}: missing\n" );
61 if ( $size == 0 && $row->img_size != 0 ) {
62 $this->
output(
"{$row->img_name}: truncated, was {$row->img_size}\n" );
66 if ( $size != $row->img_size ) {
67 $this->
output(
"{$row->img_name}: size mismatch DB={$row->img_size}, "
68 .
"actual={$size}\n" );
74 }
while ( $res->numRows() );
76 $this->
output(
"Good images: $numGood/$numImages\n" );