r70012 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70011‎ | r70012 | r70013 >
Date:13:19, 27 July 2010
Author:platonides
Status:ok
Tags:
Comment:
There's no longer a $wgLoadBalancer global. Replace with wfGetLB().
At least the isset() ensured do_templatelinks_update() didn't die.
Modified paths:
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updaters.inc
@@ -760,7 +760,7 @@
761761 }
762762
763763 function do_templatelinks_update() {
764 - global $wgDatabase, $wgLoadBalancer;
 764+ global $wgDatabase;
765765 $fname = 'do_templatelinks_update';
766766
767767 if ( $wgDatabase->tableExists( 'templatelinks' ) ) {
@@ -770,7 +770,7 @@
771771 wfOut( "Creating templatelinks table...\n" );
772772 $wgDatabase->sourceFile( archive( 'patch-templatelinks.sql' ) );
773773 wfOut( "Populating...\n" );
774 - if ( isset( $wgLoadBalancer ) && $wgLoadBalancer->getServerCount() > 1 ) {
 774+ if ( wfGetLB()->getServerCount() > 1 ) {
775775 // Slow, replication-friendly update
776776 $res = $wgDatabase->select( 'pagelinks', array( 'pl_from', 'pl_namespace', 'pl_title' ),
777777 array( 'pl_namespace' => NS_TEMPLATE ), $fname );

Status & tagging log