* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
use MediaWiki\Permissions\PermissionManager;
/**
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' );
}
$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' );