diff --git a/Echo.php b/Echo.php index 721c84a9e..910aaeda7 100644 --- a/Echo.php +++ b/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'; diff --git a/Hooks.php b/Hooks.php index 6ef847e12..689bf74b0 100644 --- a/Hooks.php +++ b/Hooks.php @@ -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(); + } + } /**