Remove dependence upon $wgPasswordSenderName

Fallback to 'emailsender' message if not set

Change-Id: Id136692b80b7582a515501672259394e8db74112
Follows-Up: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
This commit is contained in:
Kunal Mehta 2014-02-24 22:09:27 -08:00
parent aa6714b5f8
commit 1ea7332cc1
2 changed files with 9 additions and 2 deletions

View file

@ -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';

View file

@ -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();
}
}
/**