* API upload errors may now return the parameter that needs to be changed and
a sessionkey to fix the error.
* (bug 28249) allow dupes in meta=allmessages&amargs
+* (bug 28263) cannot import xml with the api, when have not "import" user
+ right, but "importupload"
=== Languages updated in 1.18 ===
public function execute() {
global $wgUser;
- if ( !$wgUser->isAllowed( 'import' ) ) {
- $this->dieUsageMsg( array( 'cantimport' ) );
- }
+
$params = $this->extractRequestParams();
$isUpload = false;
if ( isset( $params['interwikisource'] ) ) {
+ if ( !$wgUser->isAllowed( 'import' ) ) {
+ $this->dieUsageMsg( array( 'cantimport' ) );
+ }
if ( !isset( $params['interwikipage'] ) ) {
$this->dieUsageMsg( array( 'missingparam', 'interwikipage' ) );
}
private $logcomment= false;
private $history = true;
private $includeTemplates = false;
+ private $pageLinkDepth;
/**
* Constructor
private function showForm() {
global $wgUser, $wgOut, $wgImportSources, $wgExportMaxLinkDepth;
- if( !$wgUser->isAllowedAny( 'import', 'importupload' ) )
+ if( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) {
return $wgOut->permissionRequired( 'import' );
+ }
$action = $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) );
}
}
+ /**
+ * @param Title $title
+ * @param Title $origTitle
+ * @param int $revisionCount
+ * @param $successCount
+ * @param $pageInfo
+ * @return void
+ */
function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
global $wgOut, $wgUser, $wgLang, $wgContLang;