private function getNsIndex( $namespace ) {
global $wgContLang;
- if ( ( $result = $wgContLang->getNsIndex( $namespace ) ) !== false ) {
+ $result = $wgContLang->getNsIndex( $namespace );
+ if ( $result !== false ) {
return $result;
}
$ns = intval( $namespace );
} 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 );
}
}
wfWaitForSlaves();
- // XXX: Don't let deferred jobs array get absurdly large (bug 24375)
- DeferredUpdates::doUpdates( 'commit' );
}
function progress( $string ) {
$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 );