X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdb%2FMWLBFactory.php;h=e50f855edb138c1a725ce83ef4ffc389d082ecba;hb=c31d80f1bf7129350042a8a006886adf5bcd1996;hp=82d9c1d564b52d66858084a7a2539a1a1111c79f;hpb=278ae11ae78d282949a00e1026b60facfff817ac;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index 82d9c1d564..e50f855edb 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -65,6 +65,7 @@ abstract class MWLBFactory { 'cliMode' => $wgCommandLineMode, 'hostname' => wfHostname(), 'readOnlyReason' => $readOnlyMode->getReason(), + 'defaultGroup' => $mainConfig->get( 'DBDefaultGroup' ), ]; // When making changes here, remember to also specify MediaWiki-specific options @@ -208,10 +209,8 @@ abstract class MWLBFactory { return $class; } - public static function setSchemaAliases( LBFactory $lbFactory ) { - $mainLB = $lbFactory->getMainLB(); - $masterType = $mainLB->getServerType( $mainLB->getWriterIndex() ); - if ( $masterType === 'mysql' ) { + public static function setSchemaAliases( LBFactory $lbFactory, Config $config ) { + if ( $config->get( 'DBtype' ) === 'mysql' ) { /** * When SQLite indexes were introduced in r45764, it was noted that * SQLite requires index names to be unique within the whole database,