]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - maintenance/getLagTimes.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / maintenance / getLagTimes.php
index bc14ae718ee5d23706931c101d93ad727304cf1a..0322fa2dc2048887d5206b6caa0261d0a721c2a7 100644 (file)
@@ -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 );