From 92aecd02c1c88c4f7ec2afeee4a25d8a0479e42a Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 12 May 2008 22:01:44 +0000 Subject: [PATCH] apply live hacks from wikimedia site: * fix $wgDBadminuser/pass usage with new load balancer * some test.wikipedia check... yay hardcoded crap :D * hardcoded wikimedia PMTPA check, yay --- maintenance/commandLine.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 29bb84ad14..6b86384368 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -111,7 +111,8 @@ if (!isset( $wgUseNormalUser ) ) { if ( file_exists( '/home/wikipedia/common/langlist' ) ) { $wgWikiFarm = true; - $cluster = trim( file_get_contents( '/etc/cluster' ) ); + #$cluster = trim( file_get_contents( '/etc/cluster' ) ); + $cluster = 'pmtpa'; require_once( "$IP/includes/SiteConfiguration.php" ); # Get $wgConf @@ -152,6 +153,10 @@ if ( file_exists( '/home/wikipedia/common/langlist' ) ) { $DP = $IP; ini_set( 'include_path', ".:$IP:$IP/includes:$IP/languages:$IP/maintenance" ); + if ( $lang == 'test' && $site == 'wikipedia' ) { + define( 'TESTWIKI', 1 ); + } + #require_once( $IP.'/includes/ProfilerStub.php' ); require_once( $IP.'/includes/Defines.php' ); require_once( $IP.'/CommonSettings.php' ); @@ -209,6 +214,10 @@ if ( empty( $wgUseNormalUser ) && isset( $wgDBadminuser ) ) { $wgDBservers[$i]['password'] = $wgDBpassword; } } + if( isset( $wgLBFactoryConf['serverTemplate'] ) ) { + $wgLBFactoryConf['serverTemplate']['user'] = $wgDBuser; + $wgLBFactoryConf['serverTemplate']['password'] = $wgDBpassword; + } } if ( defined( 'MW_CMDLINE_CALLBACK' ) ) { -- 2.20.1