mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Remove dependence upon $wgPasswordSenderName
Fallback to 'emailsender' message if not set Change-Id: Id136692b80b7582a515501672259394e8db74112 Follows-Up: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
This commit is contained in:
parent
aa6714b5f8
commit
1ea7332cc1
3
Echo.php
3
Echo.php
|
@ -273,7 +273,8 @@ $wgEchoEmailFooterAddress = '';
|
|||
// Should be defined in LocalSettings.php
|
||||
$wgNotificationSender = $wgPasswordSender;
|
||||
// Name for "from" on email notifications. Should be defined in LocalSettings.php
|
||||
$wgNotificationSenderName = $wgPasswordSenderName;
|
||||
// if null, uses 'emailsender' message
|
||||
$wgNotificationSenderName = null;
|
||||
// Name for "reply to" on email notifications. Should be defined in LocalSettings.php
|
||||
$wgNotificationReplyName = 'No Reply';
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@ class EchoHooks {
|
|||
*/
|
||||
public static function initEchoExtension() {
|
||||
global $wgEchoBackend, $wgEchoBackendName, $wgEchoNotifications,
|
||||
$wgEchoNotificationCategories, $wgEchoNotificationIcons, $wgEchoConfig;
|
||||
$wgEchoNotificationCategories, $wgEchoNotificationIcons, $wgEchoConfig,
|
||||
$wgNotificationSenderName;
|
||||
|
||||
// allow extensions to define their own event
|
||||
wfRunHooks( 'BeforeCreateEchoEvent', array( &$wgEchoNotifications, &$wgEchoNotificationCategories, &$wgEchoNotificationIcons ) );
|
||||
|
@ -29,6 +30,11 @@ class EchoHooks {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $wgNotificationSenderName === null ) {
|
||||
$wgNotificationSenderName = wfMessage( 'emailsender' )->inContentLanguage()->text();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue