X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialEmailUser.php;h=c8b92bd10db41903664d2bff32942e9ad1d82a07;hb=4fe1735ba32b11ab9115f36511508885045ebdb2;hp=e1606b25619a8cdae8fc301478a361cd113b0d0a;hpb=61544d6eb235342d004a2fefc159167f28c69099;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialEmailUser.php b/includes/specials/SpecialEmailUser.php index e1606b2561..c8b92bd10d 100644 --- a/includes/specials/SpecialEmailUser.php +++ b/includes/specials/SpecialEmailUser.php @@ -253,7 +253,10 @@ class SpecialEmailUser extends UnlistedSpecialPage { return 'mailnologin'; } - if ( !$user->isAllowed( 'sendemail' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $user, 'sendemail' ) + ) { return 'badaccess'; } @@ -375,6 +378,15 @@ class SpecialEmailUser extends UnlistedSpecialPage { $text .= $context->msg( 'emailuserfooter', $from->name, $to->name )->inContentLanguage()->text(); + if ( $config->get( 'EnableSpecialMute' ) ) { + $specialMutePage = SpecialPage::getTitleFor( 'Mute', $context->getUser()->getName() ); + $text .= "\n" . $context->msg( + 'specialmute-email-footer', + $specialMutePage->getCanonicalURL(), + $context->getUser()->getName() + )->inContentLanguage()->text(); + } + // Check and increment the rate limits if ( $context->getUser()->pingLimiter( 'emailuser' ) ) { throw new ThrottledError();