Skip to content

Commit

Permalink
Use ConnectionProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Nov 21, 2024
1 parent e27c383 commit a070d3c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions includes/Helpers/ManageWikiPermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,8 @@ public function commit() {

private function deleteUsersFromGroup( string $group ) {
$groupManager = MediaWikiServices::getInstance()->getUserGroupManager();
$dbr = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()
->getMainLB( $this->wiki )
->getMaintenanceConnectionRef( DB_REPLICA, [], $this->wiki );
$dbr = MediaWikiServices::getInstance()->getConnectionProvider()
->getReplicaDatabase( $this->wiki );

$res = $dbr->select(
'user_groups',
Expand Down

0 comments on commit a070d3c

Please sign in to comment.