Skip to content

Commit

Permalink
Migrate to use ConnectionProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Nov 20, 2024
1 parent b5fb800 commit 2ab84ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions includes/Helpers/ManageWikiInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ public static function process( string $dbname, array $actions, bool $install =
}

private static function sql( string $dbname, array $data ) {
$dbw = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()
->getMainLB( $dbname )
->getMaintenanceConnectionRef( DB_PRIMARY, [], $dbname );
$dbw = MediaWikiServices::getInstance()->getConnectionProvider()
->getPrimaryDatabase( $dbname );

foreach ( $data as $table => $sql ) {
if ( !$dbw->tableExists( $table ) ) {
Expand Down

0 comments on commit 2ab84ee

Please sign in to comment.