X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=inline;f=maintenance%2Flag.php;h=52f8201a4af67cac7a9513213050b441c6cf3311;hb=2610395f793a778ceb4955145d1ffd9f5eb6b2f7;hp=3df1169296b77a6d3e6e302aeb09c59f32aa7285;hpb=88a586a12cf9e4674b20ebc060aca2cd9fdb7054;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/lag.php b/maintenance/lag.php index 3df1169296..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 ); } @@ -68,4 +70,4 @@ class DatabaseLag extends Maintenance { } $maintClass = "DatabaseLag"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;