X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=includes%2Fdb%2FMWLBFactory.php;h=3d404d3c8ee43dc22efc7f867b234afd8e71de81;hb=57e4804bf2ba4481eb9b35680fb8ccc71a912c50;hp=be4f6ba57c31aa3f82410cf8899be084938fd308;hpb=956ffb9cd77bb9748cf7bc425d50f0eea7e3abdd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index be4f6ba57c..3d404d3c8e 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -56,6 +56,7 @@ abstract class MWLBFactory { 'DBuser', 'DBWindowsAuthentication', 'DebugDumpSql', + 'DebugLogFile', 'ExternalServers', 'SQLiteDataDir', 'SQLMode', @@ -69,6 +70,7 @@ abstract class MWLBFactory { * @param BagOStuff $mainStash * @param WANObjectCache $wanCache * @return array + * @internal For use with service wiring */ public static function applyDefaultConfig( array $lbConf, @@ -151,8 +153,11 @@ abstract class MWLBFactory { $serversCheck = [ $lbConf['serverTemplate'] ] ?? []; } - self::assertValidServerConfigs( $serversCheck, $options->get( 'DBname' ), - $options->get( 'DBprefix' ) ); + self::assertValidServerConfigs( + $serversCheck, + $options->get( 'DBname' ), + $options->get( 'DBprefix' ) + ); $lbConf = self::injectObjectCaches( $lbConf, $srvCace, $mainStash, $wanCache ); @@ -163,7 +168,7 @@ abstract class MWLBFactory { * @return array */ private static function getDbTypesWithSchemas() { - return [ 'postgres', 'msssql' ]; + return [ 'postgres', 'mssql' ]; } /** @@ -206,6 +211,7 @@ abstract class MWLBFactory { $flags = DBO_DEFAULT; $flags |= $options->get( 'DebugDumpSql' ) ? DBO_DEBUG : 0; + $flags |= $options->get( 'DebugLogFile' ) ? DBO_DEBUG : 0; if ( $server['type'] === 'oracle' ) { $flags |= $options->get( 'DBOracleDRCP' ) ? DBO_PERSISTENT : 0; } @@ -245,8 +251,8 @@ abstract class MWLBFactory { /** * @param array $servers - * @param string $lbDB Local domain database name - * @param string $lbTP Local domain prefix + * @param string $ldDB Local domain database name + * @param string $ldTP Local domain prefix */ private static function assertValidServerConfigs( array $servers, $ldDB, $ldTP ) { foreach ( $servers as $server ) { @@ -326,6 +332,7 @@ abstract class MWLBFactory { * * @param array $config (e.g. $wgLBFactoryConf) * @return string Class name + * @internal For use with service wiring */ public static function getLBFactoryClass( array $config ) { // For configuration backward compatibility after removing @@ -363,13 +370,9 @@ abstract class MWLBFactory { /** * @param LBFactory $lbFactory * @param string $dbType 'mysql', 'sqlite', etc. + * @internal For use with service wiring */ public static function setSchemaAliases( LBFactory $lbFactory, $dbType ) { - if ( $dbType instanceof Config ) { - // Before 1.34 this took a whole Config just to get $dbType - wfDeprecated( __METHOD__ . ' with Config argument', '1.34' ); - $dbType = $dbType->get( 'DBtype' ); - } if ( $dbType === 'mysql' ) { /** * When SQLite indexes were introduced in r45764, it was noted that @@ -396,6 +399,7 @@ abstract class MWLBFactory { /** * Log a database deprecation warning * @param string $msg Deprecation message + * @internal For use with service wiring */ public static function logDeprecation( $msg ) { global $wgDevelopmentWarnings;