Merge "(bug 30040) Update autonym for nds-nl"
[lhc/web/wiklou.git] / maintenance / initEditCount.php
index a526081..3135b4c 100644 (file)
@@ -22,7 +22,7 @@
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
 class InitEditCount extends Maintenance {
        public function __construct() {
@@ -48,7 +48,7 @@ in the load balancer, usually indicating a replication environment.' );
                // Autodetect mode...
                $backgroundMode = wfGetLB()->getServerCount() > 1 ||
                        ( $dbw instanceof DatabaseMysql && version_compare( $dbver, '4.1' ) < 0 );
-       
+
                if ( $this->hasOption( 'background' ) ) {
                        $backgroundMode = true;
                } elseif ( $this->hasOption( 'quick' ) ) {
@@ -93,7 +93,7 @@ in the load balancer, usually indicating a replication environment.' );
                                        $delta,
                                        $rate ) );
 
-                               wfWaitForSlaves( 10 );
+                               wfWaitForSlaves();
                        }
                } else {
                        // Subselect should work on modern MySQLs etc
@@ -107,4 +107,4 @@ in the load balancer, usually indicating a replication environment.' );
 }
 
 $maintClass = "InitEditCount";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );