diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
commit | a2190ac74dd4d7080b12bab90e552d7aa81209ef (patch) | |
tree | 8b31f38de9882d18df54cf8d9e0de74167a094eb /includes/api/ApiImport.php | |
parent | 15e69f7b20b6596b9148030acce5b59993b95a45 (diff) | |
parent | 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff) |
Merge branch 'mw-1.26'
Diffstat (limited to 'includes/api/ApiImport.php')
-rw-r--r-- | includes/api/ApiImport.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index 2e87d22d..735cc7fa 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -32,9 +32,13 @@ class ApiImport extends ApiBase { public function execute() { + $this->useTransactionalTimeLimit(); + $user = $this->getUser(); $params = $this->extractRequestParams(); + $this->requireMaxOneParameter( $params, 'namespace', 'rootpage' ); + $isUpload = false; if ( isset( $params['interwikisource'] ) ) { if ( !$user->isAllowed( 'import' ) ) { @@ -63,8 +67,7 @@ class ApiImport extends ApiBase { $importer = new WikiImporter( $source->value, $this->getConfig() ); if ( isset( $params['namespace'] ) ) { $importer->setTargetNamespace( $params['namespace'] ); - } - if ( isset( $params['rootpage'] ) ) { + } elseif ( isset( $params['rootpage'] ) ) { $statusRootPage = $importer->setTargetRootPage( $params['rootpage'] ); if ( !$statusRootPage->isGood() ) { $this->dieStatus( $statusRootPage ); |