54 $res = FileSelectQueryBuilder::newForFile( $dbr )
55 ->where( $dbr->expr(
'img_name',
'>', $start ) )
57 ->orderBy(
'img_name', SelectQueryBuilder::SORT_ASC )
58 ->caller( __METHOD__ )
60 foreach ( $res as $row ) {
62 $start = $row->img_name;
63 $file = $repo->newFileFromRow( $row );
64 $path = $file->getPath();
66 $this->
output(
"{$row->img_name}: not locally accessible\n" );
69 $size = $repo->getFileSize( $file->getPath() );
70 if ( $size ===
false ) {
71 $this->
output(
"{$row->img_name}: missing\n" );
75 if ( $size == 0 && $row->img_size != 0 ) {
76 $this->
output(
"{$row->img_name}: truncated, was {$row->img_size}\n" );
80 if ( $size != $row->img_size ) {
81 $this->
output(
"{$row->img_name}: size mismatch DB={$row->img_size}, "
82 .
"actual={$size}\n" );
88 }
while ( $res->numRows() );
90 $this->
output(
"Good images: $numGood/$numImages\n" );