From: Alexandre Emsenhuber Date: Sun, 10 Oct 2010 12:20:53 +0000 (+0000) Subject: Use wfGetLB()->getServerCount() to get the server count, not $wgDBservers X-Git-Tag: 1.31.0-rc.0~34550 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=ba6149e12c7066be1c8364b4f0dad7252e087b5d;p=lhc%2Fweb%2Fwiklou.git Use wfGetLB()->getServerCount() to get the server count, not $wgDBservers --- diff --git a/maintenance/fixSlaveDesync.php b/maintenance/fixSlaveDesync.php index 321c041a30..0d91f540bd 100644 --- a/maintenance/fixSlaveDesync.php +++ b/maintenance/fixSlaveDesync.php @@ -28,9 +28,8 @@ class FixSlaveDesync extends Maintenance { } public function execute() { - global $wgDBservers; $this->slaveIndexes = array(); - for ( $i = 1; $i < count( $wgDBservers ); $i++ ) { + for ( $i = 1; $i < wfGetLB()->getServerCount(); $i++ ) { if ( wfGetLB()->isNonZeroLoad( $i ) ) { $this->slaveIndexes[] = $i; }