Drop $wgNotificationReplyName, instead let just show the e-mail

This is what MediaWiki itself does. It's not great, and isn't any more
translatable than a config setting, but consistency isn't valueless. In
future, with T202326 we may wish to vary this, but for now this is
simpler.

Change-Id: I76fca8ee255c65ab9b7e988d44de0d0fbd3c84b7
This commit is contained in:
James D. Forrester 2018-08-20 13:50:25 -07:00 committed by Catrope
parent 92b2df6f3e
commit 918a19efac
3 changed files with 4 additions and 7 deletions

View file

@ -458,9 +458,6 @@
"EchoEmailFooterAddress": {
"value": ""
},
"NotificationReplyName": {
"value": "No Reply"
},
"EchoCluster": {
"value": false
},

View file

@ -249,7 +249,7 @@ class MWEchoEmailBatch {
* Send the batch email
*/
public function sendEmail() {
global $wgPasswordSender, $wgNoReplyAddress, $wgNotificationReplyName;
global $wgPasswordSender, $wgNoReplyAddress;
if ( $this->mUser->getOption( 'echo-email-frequency' ) == EchoEmailFrequency::WEEKLY_DIGEST ) {
$frequency = 'weekly';
@ -283,7 +283,7 @@ class MWEchoEmailBatch {
$toAddress = MailAddress::newFromUser( $this->mUser );
$fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() );
$replyTo = new MailAddress( $wgNoReplyAddress, $wgNotificationReplyName );
$replyTo = new MailAddress( $wgNoReplyAddress );
// @Todo Push the email to job queue or just send it out directly?
UserMailer::send( $toAddress, $fromAddress, $content['subject'], $content['body'], [ 'replyTo' => $replyTo ] );

View file

@ -55,7 +55,7 @@ class EchoNotifier {
$userEmailNotifications = $attributeManager->getUserEnabledEvents( $user, 'email' );
// See if the user wants to receive emails for this category or the user is eligible to receive this email
if ( in_array( $event->getType(), $userEmailNotifications ) ) {
global $wgEchoEnableEmailBatch, $wgEchoNotifications, $wgPasswordSender, $wgNoReplyAddress, $wgNotificationReplyName;
global $wgEchoEnableEmailBatch, $wgEchoNotifications, $wgPasswordSender, $wgNoReplyAddress;
$priority = $attributeManager->getNotificationPriority( $event->getType() );
@ -90,7 +90,7 @@ class EchoNotifier {
// instant email notification
$toAddress = MailAddress::newFromUser( $user );
$fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() );
$replyAddress = new MailAddress( $wgNoReplyAddress, $wgNotificationReplyName );
$replyAddress = new MailAddress( $wgNoReplyAddress );
// Since we are sending a single email, should set the bundle hash to null
// if it is set with a value from somewhere else
$event->setBundleHash( null );