From: Brion Vibber Date: Mon, 12 May 2008 22:01:44 +0000 (+0000) Subject: apply live hacks from wikimedia site: X-Git-Tag: 1.31.0-rc.0~47690 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=92aecd02c1c88c4f7ec2afeee4a25d8a0479e42a;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ) ) {