From: Alexandre Emsenhuber Date: Fri, 30 Mar 2012 17:43:07 +0000 (+0200) Subject: * (bug 35567) The whole password reminder e-mail is now sent in the same language X-Git-Tag: 1.31.0-rc.0~24092^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=37857ced484e1fdde1fa0588754f33f8aa44384e;p=lhc%2Fweb%2Fwiklou.git * (bug 35567) The whole password reminder e-mail is now sent in the same language Change-Id: Id57c916388edfd1347bedde28af872c81301f99e --- 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,