X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportDump.php;h=ea8c84bbbf7223066f61e6db86a8e66269a165aa;hb=11a37d24fb131f6f42c51e51b59c2422d199d6d2;hp=1fedefbb8c7ed8a8f2299529727cba8db1c54a3f;hpb=806dcb725770a585f4b09f0a24ba2178a74561b5;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 1fedefbb8c..ea8c84bbbf 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -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 ); @@ -271,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 );