require_once __DIR__ . '/Maintenance.php';
+use Wikimedia\Rdbms\IDatabase;
+use Wikimedia\Rdbms\IMaintainableDatabase;
+
/**
* Maintenance script to refresh image metadata fields.
*
class RefreshImageMetadata extends Maintenance {
/**
- * @var Database
+ * @var IMaintainableDatabase
*/
protected $dbw;
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 ) {
}
/**
- * @param Database $dbw
+ * @param IDatabase $dbw
* @return array
*/
function getConditions( $dbw ) {