X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmail%2FEmailNotification.php;h=4d176fb0bcc2d45d786e1e6a273df31edc0a4d9e;hb=c05e0f7d945ca411aec6e24f9d9e69517cd37f8d;hp=cba68ef587917d61dd1570be84b914094d63104f;hpb=47d73c21e7da796579a6c92928334fdfea1a3aa5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php index cba68ef587..4d176fb0bc 100644 --- a/includes/mail/EmailNotification.php +++ b/includes/mail/EmailNotification.php @@ -129,7 +129,10 @@ class EmailNotification { if ( $watchers === [] && !count( $wgUsersNotifiedOnAllChanges ) ) { $sendEmail = false; // Only send notification for non minor edits, unless $wgEnotifMinorEdits - if ( !$minorEdit || ( $wgEnotifMinorEdits && !$editor->isAllowed( 'nominornewtalk' ) ) ) { + if ( !$minorEdit || ( $wgEnotifMinorEdits && !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $editor, 'nominornewtalk' ) ) + ) { $isUserTalkPage = ( $title->getNamespace() == NS_USER_TALK ); if ( $wgEnotifUserTalk && $isUserTalkPage @@ -214,7 +217,10 @@ class EmailNotification { $userTalkId = false; - if ( !$minorEdit || ( $wgEnotifMinorEdits && !$editor->isAllowed( 'nominornewtalk' ) ) ) { + if ( !$minorEdit || ( $wgEnotifMinorEdits && !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $editor, 'nominornewtalk' ) ) + ) { if ( $wgEnotifUserTalk && $isUserTalkPage && $this->canSendUserTalkEmail( $editor, $title, $minorEdit )