Merge "Avoid doubling dump output"
authorReedy <reedy@wikimedia.org>
Sat, 31 Mar 2012 01:11:09 +0000 (01:11 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 31 Mar 2012 01:11:09 +0000 (01:11 +0000)
HISTORY
includes/specials/SpecialPasswordReset.php
includes/upload/UploadBase.php
maintenance/language/messages.inc

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,
index 81143d2..f6078dc 100644 (file)
@@ -714,26 +714,6 @@ abstract class UploadBase {
                return $this->mLocalFile;
        }
 
-       /**
-        * NOTE: Probably should be deprecated in favor of UploadStash, but this is sometimes
-        * called outside that context.
-        *
-        * Stash a file in a temporary directory for later processing
-        * after the user has confirmed it.
-        *
-        * If the user doesn't explicitly cancel or accept, these files
-        * can accumulate in the temp directory.
-        *
-        * @param $saveName String: the destination filename
-        * @param $tempSrc String: the source temporary file to save
-        * @return String: full path the stashed file, or false on failure
-        */
-       protected function saveTempUploadedFile( $saveName, $tempSrc ) {
-               $repo = RepoGroup::singleton()->getLocalRepo();
-               $status = $repo->storeTemp( $saveName, $tempSrc );
-               return $status;
-       }
-
        /**
         * If the user does not supply all necessary information in the first upload form submission (either by accident or
         * by design) then we may want to stash the file temporarily, get more information, and publish the file later.
index 093305e..b889a52 100644 (file)
@@ -1748,6 +1748,7 @@ $wgMessageStructure = array(
                'allpagesprefix',
                'allpagesbadtitle',
                'allpages-bad-ns',
+               'allpages-hide-redirects',
        ),
        'categories' => array(
                'categories',