* (bug 35567) The whole password reminder e-mail is now sent in the same language
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 30 Mar 2012 17:43:07 +0000 (19:43 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 30 Mar 2012 17:43:07 +0000 (19:43 +0200)
Change-Id: Id57c916388edfd1347bedde28af872c81301f99e

HISTORY
includes/specials/SpecialPasswordReset.php

diff --git a/HISTORY b/HISTORY
index 3dc2e9a..408ae38 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -4,6 +4,7 @@ Change notes from older releases. For current info see RELEASE-NOTES-1.20.
 === Changes since 1.18.2 ===
 * (bug 35446) Using "{{nse:}}" with an invalid namespace name no longer throws
   a PHP warning.
+* (bug 35567) The whole password reminder e-mail is now sent in the same language.
 
 == MediaWiki 1.18.2 ==
 2012-03-21
index 683a714..f140546 100644 (file)
@@ -229,18 +229,19 @@ class SpecialPasswordReset extends FormSpecialPage {
                        ? 'passwordreset-emailtext-ip'
                        : 'passwordreset-emailtext-user';
 
+               // Send in the user's language; which should hopefully be the same
+               $userLanguage = $firstUser->getOption( 'language' );
+
                $passwords = array();
                foreach ( $users as $user ) {
                        $password = $user->randomPassword();
                        $user->setNewpassword( $password );
                        $user->saveSettings();
-                       $passwords[] = $this->msg( 'passwordreset-emailelement', $user->getName(), $password )->plain(); // We'll escape the whole thing later
+                       $passwords[] = $this->msg( 'passwordreset-emailelement', $user->getName(), $password
+                               )->inLanguage( $userLanguage )->plain(); // We'll escape the whole thing later
                }
                $passwordBlock = implode( "\n\n", $passwords );
 
-               // Send in the user's language; which should hopefully be the same
-               $userLanguage = $firstUser->getOption( 'language' );
-
                $this->email = $this->msg( $msg )->inLanguage( $userLanguage );
                $this->email->params(
                        $username,