Drop $wgNotificationSenderName

Instead just use the system message `emailsender` like we do for all other
e-mails, which is thus translatable.

Change-Id: I7e58a3a4e224d551c6fae4a76fcba19fe838d3e9
This commit is contained in:
James D. Forrester 2018-08-20 13:44:33 -07:00 committed by Krinkle
parent 229471d1b0
commit d2ab6527e9
4 changed files with 2 additions and 14 deletions

View file

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

View file

@ -63,15 +63,6 @@ class EchoHooks {
}
}
public static function getNotificationSenderName() {
global $wgNotificationSenderName;
if ( $wgNotificationSenderName === null ) {
$wgNotificationSenderName = wfMessage( 'emailsender' )->inContentLanguage()->text();
}
return $wgNotificationSenderName;
}
/**
* ResourceLoaderTestModules hook handler
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules

View file

@ -282,7 +282,7 @@ class MWEchoEmailBatch {
}
$toAddress = MailAddress::newFromUser( $this->mUser );
$fromAddress = new MailAddress( $wgPasswordSender, EchoHooks::getNotificationSenderName() );
$fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() );
$replyTo = new MailAddress( $wgPasswordSender, $wgNotificationReplyName );
// @Todo Push the email to job queue or just send it out directly?

View file

@ -89,7 +89,7 @@ class EchoNotifier {
// instant email notification
$toAddress = MailAddress::newFromUser( $user );
$fromAddress = new MailAddress( $wgPasswordSender, EchoHooks::getNotificationSenderName() );
$fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() );
$replyAddress = new MailAddress( $wgPasswordSender, $wgNotificationReplyName );
// Since we are sending a single email, should set the bundle hash to null
// if it is set with a value from somewhere else