dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add help link to Special:NewSection"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialImport.php
diff --git
a/includes/specials/SpecialImport.php
b/includes/specials/SpecialImport.php
index
302a55f
..
f21c206
100644
(file)
--- a/
includes/specials/SpecialImport.php
+++ b/
includes/specials/SpecialImport.php
@@
-24,6
+24,7
@@
* @ingroup SpecialPage
*/
* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
use MediaWiki\Permissions\PermissionManager;
/**
use MediaWiki\Permissions\PermissionManager;
/**
@@
-76,7
+77,10
@@
class SpecialImport extends SpecialPage {
Hooks::run( 'ImportSources', [ &$this->importSources ] );
$user = $this->getUser();
Hooks::run( 'ImportSources', [ &$this->importSources ] );
$user = $this->getUser();
- if ( !$user->isAllowedAny( 'import', 'importupload' ) ) {
+ if ( !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasAnyRight( $user, 'import', 'importupload' )
+ ) {
throw new PermissionsError( 'import' );
}
throw new PermissionsError( 'import' );
}
@@
-322,7
+326,7
@@
class SpecialImport extends SpecialPage {
$action = $this->getPageTitle()->getLocalURL( [ 'action' => 'submit' ] );
$user = $this->getUser();
$out = $this->getOutput();
$action = $this->getPageTitle()->getLocalURL( [ 'action' => 'submit' ] );
$user = $this->getUser();
$out = $this->getOutput();
- $this->addHelpLink( '//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Import', true );
+ $this->addHelpLink( '
https:
//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Import', true );
if ( $user->isAllowed( 'importupload' ) ) {
$mappingSelection = $this->getMappingFormPart( 'upload' );
if ( $user->isAllowed( 'importupload' ) ) {
$mappingSelection = $this->getMappingFormPart( 'upload' );