r113947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113946‎ | r113947 | r113948 >
Date:19:59, 15 March 2012
Author:amire80
Status:ok
Tags:
Comment:
Added very basic support for actual emailing.
Modified paths:
  • /trunk/extensions/TranslationNotifications/SpecialNotifyTranslators.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TranslationNotifications/SpecialNotifyTranslators.php
@@ -183,7 +183,7 @@
184184 if ( $userName === '' ) {
185185 $userName = $user->getName();
186186 }
187 - $languageName = $userFirstLanguage->getLanguageName();
 187+ $languageName = $userFirstLanguage->fetchLanguageName( $languageCode );
188188 $priorityClause = ( self::$priority === 'unset' )
189189 ? ''
190190 : wfMessage( 'translationnotifications-email-priority', self::$priority );
@@ -204,6 +204,13 @@
205205 $priorityClause,
206206 $deadlineClause,
207207 self::$notificationText
208 - )->inLanguage( $userFirstLanguage )->text();;
 208+ )->inLanguage( $userFirstLanguage )->text();
 209+
 210+ global $wgUser;
 211+ $emailFrom = new MailAddress( $wgUser );
 212+ $emailTo = new MailAddress( $user );
 213+
 214+ return UserMailer::send( $emailTo, $emailFrom, $emailSubject, $emailBody );
209215 }
210216 }
 217+

Status & tagging log