Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/115341

Change subject: Remove dependence upon $wgPasswordSenderName
......................................................................

Remove dependence upon $wgPasswordSenderName

Fallback to 'emailsender' message if not set

Change-Id: Id136692b80b7582a515501672259394e8db74112
Follows-Up: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
---
M Echo.php
M Hooks.php
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/41/115341/1

diff --git a/Echo.php b/Echo.php
index 721c84a..910aaed 100644
--- a/Echo.php
+++ b/Echo.php
@@ -273,7 +273,8 @@
 // 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 6ef847e..689bf74 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -14,7 +14,8 @@
         */
        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 @@
                                }
                        }
                }
+
+               if ( $wgNotificationSenderName === null ) {
+                       $wgNotificationSenderName = wfMessage( 'emailsender' 
)->inContentLanguage()->text();
+               }
+
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/115341
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id136692b80b7582a515501672259394e8db74112
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to