From 37857ced484e1fdde1fa0588754f33f8aa44384e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 30 Mar 2012 19:43:07 +0200 Subject: [PATCH] * (bug 35567) The whole password reminder e-mail is now sent in the same language Change-Id: Id57c916388edfd1347bedde28af872c81301f99e --- HISTORY | 1 + includes/specials/SpecialPasswordReset.php | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 3dc2e9a3cc..408ae38478 100644 --- 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 diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 683a71422a..f140546a47 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -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, -- 2.20.1