There's no longer a $wgLoadBalancer global. Replace with wfGetLB().
authorPlatonides <platonides@users.mediawiki.org>
Tue, 27 Jul 2010 13:19:16 +0000 (13:19 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 27 Jul 2010 13:19:16 +0000 (13:19 +0000)
At least the isset() ensured do_templatelinks_update() didn't die.

maintenance/updaters.inc

index 3a08725..a66b089 100644 (file)
@@ -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 );