mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-11-28 00:40:38 +00:00
Migrate ILB::getConnectionRef() calls to ILB::getMaintenanceConnectionRef()
Deprecated since 1.39 (I6e7544763bd) Remove deprecated ILB::reuseConnection() calls as well Bug: T343277 Change-Id: I477c216fe75bb393fc892ded13f3d117b6fda4aa
This commit is contained in:
parent
02e4e6ac72
commit
eb79e7b8b8
|
@ -290,11 +290,10 @@ class LoginNotify implements LoggerAwareInterface {
|
|||
$lb = MediaWikiServices::getInstance()
|
||||
->getDBLoadBalancerFactory()
|
||||
->getMainLB( $wiki );
|
||||
$dbrLocal = $lb->getConnectionRef( DB_REPLICA, [], $wiki );
|
||||
$dbrLocal = $lb->getMaintenanceConnectionRef( DB_REPLICA, [], $wiki );
|
||||
|
||||
if ( !$this->hasCheckUserTables( $dbrLocal ) ) {
|
||||
// Skip this wiki, no checkuser table.
|
||||
$lb->reuseConnection( $dbrLocal );
|
||||
continue;
|
||||
}
|
||||
// FIXME The case where there are no CU entries for
|
||||
|
@ -306,7 +305,6 @@ class LoginNotify implements LoggerAwareInterface {
|
|||
);
|
||||
|
||||
if ( $res === self::USER_KNOWN ) {
|
||||
$lb->reuseConnection( $dbrLocal );
|
||||
return $res;
|
||||
}
|
||||
if ( $result === self::USER_NO_INFO
|
||||
|
@ -314,7 +312,6 @@ class LoginNotify implements LoggerAwareInterface {
|
|||
) {
|
||||
$result = self::USER_NOT_KNOWN;
|
||||
}
|
||||
$lb->reuseConnection( $dbrLocal );
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue