Merge "Add function to clear mPreparedEdit, to use in cases of mutable content"
[lhc/web/wiklou.git] / includes / api / ApiImport.php
index 56af76f..9253964 100644 (file)
@@ -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 );
@@ -67,7 +67,7 @@ class ApiImport extends ApiBase {
                if ( isset( $params['rootpage'] ) ) {
                        $statusRootPage = $importer->setTargetRootPage( $params['rootpage'] );
                        if ( !$statusRootPage->isGood() ) {
-                               $this->dieUsageMsg( $statusRootPage->getErrorsArray() );
+                               $this->dieStatus( $statusRootPage );
                        }
                }
                $reporter = new ApiImportReporter(
@@ -99,6 +99,7 @@ class ApiImport extends ApiBase {
 
        public function getAllowedParams() {
                global $wgImportSources;
+
                return array(
                        'token' => array(
                                ApiBase::PARAM_TYPE => 'string',