Merge "Link the credits in Special:Version in all languages"
[lhc/web/wiklou.git] / maintenance / importDump.php
index 6f1d5ae..f51d7ad 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 /**
- * Copyright (C) 2005 Brion Vibber <brion@pobox.com>
+ * Import XML dump files into the current wiki.
+ *
+ * Copyright © 2005 Brion Vibber <brion@pobox.com>
  * http://www.mediawiki.org/
  *
  * This program is free software; you can redistribute it and/or modify
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
 /**
+ * Maintenance script that imports XML dump files into the current wiki.
+ *
  * @ingroup Maintenance
  */
 class BackupReader extends Maintenance {
@@ -203,8 +207,8 @@ TEXT;
        }
 
        function showReport() {
-               if ( $this->mQuiet ) {
-                       $delta = wfTime() - $this->startTime;
+               if ( !$this->mQuiet ) {
+                       $delta = microtime( true ) - $this->startTime;
                        if ( $delta ) {
                                $rate = sprintf( "%.2f", $this->pageCount / $delta );
                                $revrate = sprintf( "%.2f", $this->revCount / $delta );
@@ -250,7 +254,7 @@ TEXT;
        }
 
        function importFromHandle( $handle ) {
-               $this->startTime = wfTime();
+               $this->startTime = microtime( true );
 
                $source = new ImportStreamSource( $handle );
                $importer = new WikiImporter( $source );