mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-23 14:46:48 +00:00
Migrate to IReadableDatabase::newSelectQueryBuilder
Bug: T312469 Change-Id: I5774b8d0dc59df3404f26026b1aeeceeda413e13
This commit is contained in:
parent
96189d343b
commit
f0e11c2d1e
|
@ -51,7 +51,11 @@ class Cleanup extends Maintenance {
|
|||
$dryRun = $this->hasOption( 'dry-run' );
|
||||
|
||||
$dbr = $this->getReplicaDB();
|
||||
$maxID = (int)$dbr->selectField( 'page', 'MAX(page_id)', [], __METHOD__ );
|
||||
$maxID = (int)$dbr->newSelectQueryBuilder()
|
||||
->select( 'MAX(page_id)' )
|
||||
->from( 'page' )
|
||||
->caller( __METHOD__ )
|
||||
->fetchField();
|
||||
$reportingInterval = 100;
|
||||
|
||||
$this->output( "Regexes are " . implode( ', ', array_map( 'strlen', $regexes ) ) . " bytes\n" );
|
||||
|
|
Loading…
Reference in a new issue