* @param array $tablesToClone An array of tables to clone, unprefixed
* @param string $newTablePrefix Prefix to assign to the tables
* @param string $oldTablePrefix Prefix on current tables, if not $wgDBprefix
* @param bool $dropCurrentTables
*/
* @param array $tablesToClone An array of tables to clone, unprefixed
* @param string $newTablePrefix Prefix to assign to the tables
* @param string $oldTablePrefix Prefix on current tables, if not $wgDBprefix
* @param bool $dropCurrentTables
*/
- wfGetLBFactory()->forEachLB( function( LoadBalancer $lb ) use ( $prefix ) {
- $lb->setDomainPrefix( $prefix );
- $lb->forEachOpenConnection( function ( IDatabase $db ) use ( $prefix ) {
- $db->tablePrefix( $prefix );
- } );
- } );
+
+ $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+ $lbFactory->setDomainPrefix( $prefix );