X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FgetLagTimes.php;h=0322fa2dc2048887d5206b6caa0261d0a721c2a7;hb=606872436bd27a669a6dfc23901923a87d0b6fa4;hp=9c9f6b18a13f60d653d1a2918f0fa1f95597cff1;hpb=30468dbcf754c38a8f4e534951015159748776bc;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/getLagTimes.php b/maintenance/getLagTimes.php index 9c9f6b18a1..0322fa2dc2 100644 --- a/maintenance/getLagTimes.php +++ b/maintenance/getLagTimes.php @@ -18,7 +18,7 @@ * @ingroup Maintenance */ -require_once( "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 );