Index: trunk/phase3/includes/api/ApiImport.php |
— | — | @@ -42,13 +42,14 @@ |
43 | 43 | |
44 | 44 | public function execute() { |
45 | 45 | global $wgUser; |
46 | | - if ( !$wgUser->isAllowed( 'import' ) ) { |
47 | | - $this->dieUsageMsg( array( 'cantimport' ) ); |
48 | | - } |
| 46 | + |
49 | 47 | $params = $this->extractRequestParams(); |
50 | 48 | |
51 | 49 | $isUpload = false; |
52 | 50 | if ( isset( $params['interwikisource'] ) ) { |
| 51 | + if ( !$wgUser->isAllowed( 'import' ) ) { |
| 52 | + $this->dieUsageMsg( array( 'cantimport' ) ); |
| 53 | + } |
53 | 54 | if ( !isset( $params['interwikipage'] ) ) { |
54 | 55 | $this->dieUsageMsg( array( 'missingparam', 'interwikipage' ) ); |
55 | 56 | } |
Index: trunk/phase3/includes/specials/SpecialImport.php |
— | — | @@ -37,6 +37,7 @@ |
38 | 38 | private $logcomment= false; |
39 | 39 | private $history = true; |
40 | 40 | private $includeTemplates = false; |
| 41 | + private $pageLinkDepth; |
41 | 42 | |
42 | 43 | /** |
43 | 44 | * Constructor |
— | — | @@ -144,8 +145,9 @@ |
145 | 146 | |
146 | 147 | private function showForm() { |
147 | 148 | global $wgUser, $wgOut, $wgImportSources, $wgExportMaxLinkDepth; |
148 | | - if( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) |
| 149 | + if( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) { |
149 | 150 | return $wgOut->permissionRequired( 'import' ); |
| 151 | + } |
150 | 152 | |
151 | 153 | $action = $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ); |
152 | 154 | |
— | — | @@ -312,6 +314,14 @@ |
313 | 315 | } |
314 | 316 | } |
315 | 317 | |
| 318 | + /** |
| 319 | + * @param Title $title |
| 320 | + * @param Title $origTitle |
| 321 | + * @param int $revisionCount |
| 322 | + * @param $successCount |
| 323 | + * @param $pageInfo |
| 324 | + * @return void |
| 325 | + */ |
316 | 326 | function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) { |
317 | 327 | global $wgOut, $wgUser, $wgLang, $wgContLang; |
318 | 328 | |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -79,6 +79,8 @@ |
80 | 80 | public $uploadFormTextTop; |
81 | 81 | public $uploadFormTextAfterSummary; |
82 | 82 | |
| 83 | + public $mWatchthis; |
| 84 | + |
83 | 85 | /** |
84 | 86 | * Initialize instance variables from request and create an Upload handler |
85 | 87 | * |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -290,6 +290,8 @@ |
291 | 291 | * API upload errors may now return the parameter that needs to be changed and |
292 | 292 | a sessionkey to fix the error. |
293 | 293 | * (bug 28249) allow dupes in meta=allmessages&amargs |
| 294 | +* (bug 28263) cannot import xml with the api, when have not "import" user |
| 295 | + right, but "importupload" |
294 | 296 | |
295 | 297 | === Languages updated in 1.18 === |
296 | 298 | |