Don't check namespace in SpecialWantedtemplates
[lhc/web/wiklou.git] / maintenance / importDump.php
index 1f7cbf5..ea8c84b 100644 (file)
@@ -141,8 +141,7 @@ TEXT;
                } elseif ( $obj instanceof WikiRevision ) {
                        $ns = $obj->title->getNamespace();
                } else {
-                       echo wfBacktrace();
-                       $this->error( "Cannot get namespace of object in " . __METHOD__, true );
+                       throw new MWException( "Cannot get namespace of object in " . __METHOD__ );
                }
 
                return is_array( $this->nsFilter ) && !in_array( $ns, $this->nsFilter );
@@ -182,7 +181,7 @@ TEXT;
        function handleUpload( $revision ) {
                if ( $this->uploads ) {
                        if ( $this->skippedNamespace( $revision ) ) {
-                               return;
+                               return false;
                        }
                        $this->uploadCount++;
                        // $this->report();
@@ -196,6 +195,8 @@ TEXT;
                                return $dbw->deadlockLoop( array( $revision, 'importUpload' ) );
                        }
                }
+
+               return false;
        }
 
        function handleLogItem( $rev ) {
@@ -269,7 +270,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 );