Merge "Remove unused `.success-box` class"
[lhc/web/wiklou.git] / maintenance / importDump.php
index 9834473..d5f94ad 100644 (file)
@@ -41,7 +41,18 @@ class BackupReader extends Maintenance {
        public $uploads = false;
        protected $uploadCount = 0;
        public $imageBasePath = false;
+       /** @var array|false */
        public $nsFilter = false;
+       /** @var bool|resource */
+       public $stderr;
+       /** @var callable|null */
+       protected $importCallback;
+       /** @var callable|null */
+       protected $logItemCallback;
+       /** @var callable|null */
+       protected $uploadCallback;
+       /** @var int */
+       protected $startTime;
 
        function __construct() {
                parent::__construct();
@@ -84,7 +95,7 @@ TEXT
                );
                $this->addOption( 'image-base-path', 'Import files from a specified path', false, true );
                $this->addOption( 'skip-to', 'Start from nth page by skipping first n-1 pages', false, true );
-               $this->addOption( 'username-interwiki', 'Use interwiki usernames with this prefix', false, true );
+               $this->addOption( 'username-prefix', 'Prefix for interwiki usernames', false, true );
                $this->addOption( 'no-local-users',
                        'Treat all usernames as interwiki. ' .
                        'The default is to assign edits to local users where they exist.',
@@ -112,8 +123,8 @@ TEXT
                        $this->setNsfilter( explode( '|', $this->getOption( 'namespaces' ) ) );
                }
 
-               if ( $this->hasArg() ) {
-                       $this->importFromFile( $this->getArg() );
+               if ( $this->hasArg( 0 ) ) {
+                       $this->importFromFile( $this->getArg( 0 ) );
                } else {
                        $this->importFromStdin();
                }
@@ -210,6 +221,7 @@ TEXT
                        }
                        $this->uploadCount++;
                        // $this->report();
+                       // @phan-suppress-next-line PhanUndeclaredMethod
                        $this->progress( "upload: " . $revision->getFilename() );
 
                        if ( !$this->dryRun ) {