Merge "Fix Ifb93e49b"
[lhc/web/wiklou.git] / includes / api / ApiImport.php
index 637c1ff..1f0a5fa 100644 (file)
  */
 class ApiImport extends ApiBase {
 
-       public function __construct( $main, $action ) {
-               parent::__construct( $main, $action );
-       }
-
        public function execute() {
                $user = $this->getUser();
                $params = $this->extractRequestParams();
@@ -109,7 +105,9 @@ class ApiImport extends ApiBase {
                                ApiBase::PARAM_REQUIRED => true
                        ),
                        'summary' => null,
-                       'xml' => null,
+                       'xml' => array(
+                               ApiBase::PARAM_TYPE => 'upload',
+                       ),
                        'interwikisource' => array(
                                ApiBase::PARAM_TYPE => $wgImportSources
                        ),
@@ -150,7 +148,7 @@ class ApiImport extends ApiBase {
 
        public function getDescription() {
                return array(
-                       'Import a page from another wiki, or an XML file.' ,
+                       'Import a page from another wiki, or an XML file.',
                        'Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when',
                        'sending a file for the "xml" parameter.'
                );
@@ -186,10 +184,6 @@ class ApiImport extends ApiBase {
        public function getHelpUrls() {
                return 'https://www.mediawiki.org/wiki/API:Import';
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }
 
 /**