mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-23 14:46:48 +00:00
Switch away from wfGetDB()
Bug: T357657 Change-Id: I54f95397958c99b87083894cdf867d5ef6612fe7
This commit is contained in:
parent
e986e0f83b
commit
055daa65ef
|
@ -191,7 +191,7 @@ class SpamBlacklist extends BaseBlacklist {
|
|||
$cache->makeKey( 'external-link-list', $title->getLatestRevID() ),
|
||||
$cache::TTL_MINUTE,
|
||||
static function ( $oldValue, &$ttl, array &$setOpts ) use ( $title, $fname ) {
|
||||
$dbr = wfGetDB( DB_REPLICA );
|
||||
$dbr = MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
|
||||
$setOpts += Database::getCacheSetOptions( $dbr );
|
||||
return ExternalLinksLookup::getExternalLinksForPage(
|
||||
$title->getArticleID(),
|
||||
|
|
|
@ -50,7 +50,7 @@ class Cleanup extends Maintenance {
|
|||
}
|
||||
$dryRun = $this->hasOption( 'dry-run' );
|
||||
|
||||
$dbr = wfGetDB( DB_REPLICA );
|
||||
$dbr = $this->getReplicaDB();
|
||||
$maxID = (int)$dbr->selectField( 'page', 'MAX(page_id)', [], __METHOD__ );
|
||||
$reportingInterval = 100;
|
||||
|
||||
|
|
Loading…
Reference in a new issue