X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiImport.php;h=15eac33d48fab50ea7a4dc67987a788a1db1b99c;hb=e6faa2fd76040d1cbadc6e439ecf51f8f4e52bd4;hp=5093b6b63f5bf40c4d17d779397bbab412e04df9;hpb=f4ead224970346d627cac8f61258c65c0e8162ec;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index 5093b6b63f..15eac33d48 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -4,7 +4,7 @@ * * Created on Feb 4, 2009 * - * Copyright © 2009 Roan Kattouw .@gmail.com + * Copyright © 2009 Roan Kattouw ".@gmail.com" * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -126,6 +126,17 @@ class ApiImport extends ApiBase { ); } + public function getResultProperties() { + return array( + ApiBase::PROP_LIST => true, + '' => array( + 'ns' => 'namespace', + 'title' => 'string', + 'revisions' => 'integer' + ) + ); + } + public function getDescription() { return array( 'Import a page from another wiki, or an XML file.' , @@ -187,11 +198,11 @@ class ApiImportReporter extends ImportReporter { // Add a result entry $r = array(); - if ( $title === null ) { + if ( $title === null ) { # Invalid or non-importable title $r['title'] = $pageInfo['title']; - $r['invalid'] = ''; - } else { + $r['invalid'] = ''; + } else { ApiQueryBase::addTitleInfo( $r, $title ); $r['revisions'] = intval( $successCount ); }