X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiImport.php;h=f48a822e365329b22fd50f4b03fe32b47bf448c7;hb=d95454b44fd560bffd2b480dc60b6d821ca7e6f8;hp=1f0a5fab416374aedfa26da172a62d1379582a31;hpb=08648b2b4e56fa29c0da0bdc0e0537b78f039188;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index 1f0a5fab41..f48a822e36 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -57,7 +57,7 @@ class ApiImport extends ApiBase { $source = ImportStreamSource::newFromUpload( 'xml' ); } if ( !$source->isOK() ) { - $this->dieUsageMsg( $source->getErrorsArray() ); + $this->dieStatus( $source ); } $importer = new WikiImporter( $source->value ); @@ -66,8 +66,8 @@ class ApiImport extends ApiBase { } if ( isset( $params['rootpage'] ) ) { $statusRootPage = $importer->setTargetRootPage( $params['rootpage'] ); - if( !$statusRootPage->isGood() ) { - $this->dieUsageMsg( $statusRootPage->getErrorsArray() ); + if ( !$statusRootPage->isGood() ) { + $this->dieStatus( $statusRootPage ); } } $reporter = new ApiImportReporter(