X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=a51cb83c19dc6f852bc150f92b352cf969e67703;hb=d029197c7c5b083edef20fa79cc3e6d58e161f72;hp=071b7c6feb21983d9a7d3ec9f08b6ae5f8f6e4dc;hpb=7a658df6adabf947250e15e1ff5477d1b7e5f003;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 071b7c6feb..a51cb83c19 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -605,20 +605,6 @@ if ( $wgDebugToolbar && !$wgCommandLineMode ) { // re-created while taking into account any custom settings and extensions. MediaWikiServices::resetGlobalInstance( new GlobalVarConfig(), 'quick' ); -if ( $wgSharedDB && $wgSharedTables ) { - // Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections) - MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases( - array_fill_keys( - $wgSharedTables, - [ - 'dbname' => $wgSharedDB, - 'schema' => $wgSharedSchema, - 'prefix' => $wgSharedPrefix - ] - ) - ); -} - // Define a constant that indicates that the bootstrapping of the service locator // is complete. define( 'MW_SERVICE_BOOTSTRAP_COMPLETE', 1 ); @@ -694,6 +680,20 @@ if ( $wgMainWANCache === false ) { ]; } +if ( $wgSharedDB && $wgSharedTables ) { + // Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections) + MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases( + array_fill_keys( + $wgSharedTables, + [ + 'dbname' => $wgSharedDB, + 'schema' => $wgSharedSchema, + 'prefix' => $wgSharedPrefix + ] + ) + ); +} + Profiler::instance()->scopedProfileOut( $ps_default2 ); $ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc' );