X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/mediawiki.git/blobdiff_plain/87219ebd28426c6d21cb545233ee52f5f7af7dfd..refs/tags/mediawiki-1.17.0:/maintenance/getLagTimes.php diff --git a/maintenance/getLagTimes.php b/maintenance/getLagTimes.php index bc14ae71..0322fa2d 100644 --- a/maintenance/getLagTimes.php +++ b/maintenance/getLagTimes.php @@ -18,7 +18,7 @@ * @ingroup Maintenance */ -require_once( dirname(__FILE__) . '/Maintenance.php' ); +require_once( dirname( __FILE__ ) . '/Maintenance.php' ); class GetLagTimes extends Maintenance { public function __construct() { @@ -29,14 +29,14 @@ class GetLagTimes extends Maintenance { public function execute() { $lb = wfGetLB(); - if( $lb->getServerCount() == 1 ) { + if ( $lb->getServerCount() == 1 ) { $this->error( "This script dumps replication lag times, but you don't seem to have\n" - . "a multi-host db server configuration." ); + . "a multi-host db server configuration." ); } else { $lags = $lb->getLagTimes(); - foreach( $lags as $n => $lag ) { + foreach ( $lags as $n => $lag ) { $host = $lb->getServerName( $n ); - if( IP::isValid( $host ) ) { + if ( IP::isValid( $host ) ) { $ip = $host; $host = gethostbyaddr( $host ); } else { @@ -51,4 +51,4 @@ class GetLagTimes extends Maintenance { } $maintClass = "GetLagTimes"; -require_once( DO_MAINTENANCE ); +require_once( RUN_MAINTENANCE_IF_MAIN );