Merge "Rephrase tog-norollbackdiff"
[lhc/web/wiklou.git] / maintenance / importTextFiles.php
index 14d8420..e926cfd 100644 (file)
@@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php';
 class ImportTextFiles extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Reads in text files and imports their content to pages of the wiki";
+               $this->addDescription( 'Reads in text files and imports their content to pages of the wiki' );
                $this->addOption( 'user', 'Username to which edits should be attributed. ' .
                        'Default: "Maintenance script"', false, true, 'u' );
                $this->addOption( 'summary', 'Specify edit summary for the edits', false, true, 's' );
@@ -57,7 +57,7 @@ class ImportTextFiles extends Maintenance {
 
                // Get all the arguments. A loop is required since Maintenance doesn't
                // suppport an arbitrary number of arguments.
-               $files = array();
+               $files = [];
                $i = 0;
                while ( $arg = $this->getArg( $i++ ) ) {
                        if ( file_exists( $arg ) ) {
@@ -71,7 +71,7 @@ class ImportTextFiles extends Maintenance {
                $this->output( "Importing $count pages...\n" );
 
                if ( $userName === false ) {
-                       $user = User::newSystemUser( 'Maintenance script', array( 'steal' => true ) );
+                       $user = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] );
                } else {
                        $user = User::newFromName( $userName );
                }