Merge "Use interwiki cache directly to resolve transwiki import sources"
[lhc/web/wiklou.git] / maintenance / importDump.php
index 1f75bcc..8cea5a2 100644 (file)
@@ -119,7 +119,8 @@ TEXT;
 
        private function getNsIndex( $namespace ) {
                global $wgContLang;
-               if ( ( $result = $wgContLang->getNsIndex( $namespace ) ) !== false ) {
+               $result = $wgContLang->getNsIndex( $namespace );
+               if ( $result !== false ) {
                        return $result;
                }
                $ns = intval( $namespace );
@@ -235,8 +236,6 @@ TEXT;
                        }
                }
                wfWaitForSlaves();
-               // XXX: Don't let deferred jobs array get absurdly large (bug 24375)
-               DeferredUpdates::doUpdates( 'commit' );
        }
 
        function progress( $string ) {
@@ -270,7 +269,7 @@ TEXT;
                $this->startTime = microtime( true );
 
                $source = new ImportStreamSource( $handle );
-               $importer = new WikiImporter( $source );
+               $importer = new WikiImporter( $source, $this->getConfig() );
 
                if ( $this->hasOption( 'debug' ) ) {
                        $importer->setDebug( true );