'ORDER BY' => 'img_name ASC',
];
+ $fileQuery = LocalFile::getQueryInfo();
+
do {
$res = $dbw->select(
- 'image',
- '*',
+ $fileQuery['tables'],
+ $fileQuery['fields'],
array_merge( $conds, $conds2 ),
__METHOD__,
- $options
+ $options,
+ $fileQuery['joins']
);
if ( $res->numRows() > 0 ) {
$row1 = $res->current();
- $this->output( "Processing next {$this->mBatchSize} rows starting with {$row1->img_name}.\n" );
+ $this->output( "Processing next {$res->numRows()} row(s) starting with {$row1->img_name}.\n" );
$res->rewind();
- } else {
- $this->error( "No images to process.", 4 );
}
foreach ( $res as $row ) {