$source = ImportStreamSource::newFromUpload( 'xml' );
}
if ( !$source->isOK() ) {
- $this->dieUsageMsg( $source->getErrorsArray() );
+ $this->dieStatus( $source );
}
$importer = new WikiImporter( $source->value );
if ( isset( $params['rootpage'] ) ) {
$statusRootPage = $importer->setTargetRootPage( $params['rootpage'] );
if ( !$statusRootPage->isGood() ) {
- $this->dieUsageMsg( $statusRootPage->getErrorsArray() );
+ $this->dieStatus( $statusRootPage );
}
}
$reporter = new ApiImportReporter(