X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2Flag.php;h=52f8201a4af67cac7a9513213050b441c6cf3311;hb=2b441eba406f2c4988da80d264738d45930bf041;hp=c195c4d6284602f8ea1d0dfd0cd0d5890ed2e4f6;hpb=c8b2ad0c98ad36908b329ca1d8f408dec86bbf31;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/lag.php b/maintenance/lag.php index c195c4d628..52f8201a4a 100644 --- a/maintenance/lag.php +++ b/maintenance/lag.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to show database lag. @@ -39,7 +39,9 @@ class DatabaseLag extends Maintenance { if ( $this->hasOption( 'r' ) ) { $lb = wfGetLB(); echo 'time '; - for ( $i = 1; $i < $lb->getServerCount(); $i++ ) { + + $serverCount = $lb->getServerCount(); + for ( $i = 1; $i < $serverCount; $i++ ) { $hostname = $lb->getServerName( $i ); printf( "%-12s ", $hostname ); }