From: Platonides Date: Tue, 27 Jul 2010 13:19:16 +0000 (+0000) Subject: There's no longer a $wgLoadBalancer global. Replace with wfGetLB(). X-Git-Tag: 1.31.0-rc.0~35889 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=af8c45fc8ba489667c5e4f3e53eb544d63c6bb59;p=lhc%2Fweb%2Fwiklou.git There's no longer a $wgLoadBalancer global. Replace with wfGetLB(). At least the isset() ensured do_templatelinks_update() didn't die. --- diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index 3a08725e70..a66b089f6e 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -760,7 +760,7 @@ function do_page_random_update() { } function do_templatelinks_update() { - global $wgDatabase, $wgLoadBalancer; + global $wgDatabase; $fname = 'do_templatelinks_update'; if ( $wgDatabase->tableExists( 'templatelinks' ) ) { @@ -770,7 +770,7 @@ function do_templatelinks_update() { wfOut( "Creating templatelinks table...\n" ); $wgDatabase->sourceFile( archive( 'patch-templatelinks.sql' ) ); wfOut( "Populating...\n" ); - if ( isset( $wgLoadBalancer ) && $wgLoadBalancer->getServerCount() > 1 ) { + if ( wfGetLB()->getServerCount() > 1 ) { // Slow, replication-friendly update $res = $wgDatabase->select( 'pagelinks', array( 'pl_from', 'pl_namespace', 'pl_title' ), array( 'pl_namespace' => NS_TEMPLATE ), $fname );