mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-11 17:00:10 +00:00
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:
parent
229471d1b0
commit
d2ab6527e9
|
@ -458,9 +458,6 @@
|
|||
"EchoEmailFooterAddress": {
|
||||
"value": ""
|
||||
},
|
||||
"NotificationSenderName": {
|
||||
"value": null
|
||||
},
|
||||
"NotificationReplyName": {
|
||||
"value": "No Reply"
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue