X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2Flag.php;h=52f8201a4af67cac7a9513213050b441c6cf3311;hb=2b441eba406f2c4988da80d264738d45930bf041;hp=3df1169296b77a6d3e6e302aeb09c59f32aa7285;hpb=62a6a48bd4cde140a2bebde73f882754dfaa273b;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;