Replace MimeMagic::singleton() calls
[lhc/web/wiklou.git] / maintenance / importDump.php
index 802619e..cf0e7d8 100644 (file)
@@ -37,6 +37,7 @@ class BackupReader extends Maintenance {
        public $revCount = 0;
        public $dryRun = false;
        public $uploads = false;
+       protected $uploadCount = 0;
        public $imageBasePath = false;
        public $nsFilter = false;
 
@@ -86,7 +87,7 @@ TEXT
 
        public function execute() {
                if ( wfReadOnly() ) {
-                       $this->error( "Wiki is in read-only mode; you'll need to disable it for import to work.", true );
+                       $this->fatalError( "Wiki is in read-only mode; you'll need to disable it for import to work." );
                }
 
                $this->reportingInterval = intval( $this->getOption( 'report', 100 ) );
@@ -133,7 +134,7 @@ TEXT
                if ( strval( $ns ) === $namespace && $wgContLang->getNsText( $ns ) !== false ) {
                        return $ns;
                }
-               $this->error( "Unknown namespace text / index specified: $namespace", true );
+               $this->fatalError( "Unknown namespace text / index specified: $namespace" );
        }
 
        /**
@@ -298,7 +299,7 @@ TEXT
                        $statusRootPage = $importer->setTargetRootPage( $this->getOption( 'rootpage' ) );
                        if ( !$statusRootPage->isGood() ) {
                                // Die here so that it doesn't print "Done!"
-                               $this->error( $statusRootPage->getMessage()->text(), 1 );
+                               $this->fatalError( $statusRootPage->getMessage()->text() );
                                return false;
                        }
                }