* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to show database lag.
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 );
}
}
$maintClass = "DatabaseLag";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;