Use Linker::link() instead of Linker::linkKnown() when having options
[lhc/web/wiklou.git] / includes / specials / SpecialPasswordReset.php
index 51520c8..97f0037 100644 (file)
@@ -121,6 +121,8 @@ class SpecialPasswordReset extends FormSpecialPage {
         * userCanExecute(), and if the data array contains 'Username', etc, then Username
         * resets are allowed.
         * @param $data array
+        * @throws MWException
+        * @throws ThrottledError|PermissionsError
         * @return Bool|Array
         */
        public function onSubmit( array $data ) {
@@ -238,7 +240,7 @@ class SpecialPasswordReset extends FormSpecialPage {
                        $user->setNewpassword( $password );
                        $user->saveSettings();
                        $passwords[] = $this->msg( 'passwordreset-emailelement', $user->getName(), $password
-                               )->inLanguage( $userLanguage )->plain(); // We'll escape the whole thing later
+                               )->inLanguage( $userLanguage )->text(); // We'll escape the whole thing later
                }
                $passwordBlock = implode( "\n\n", $passwords );
 
@@ -247,7 +249,7 @@ class SpecialPasswordReset extends FormSpecialPage {
                        $username,
                        $passwordBlock,
                        count( $passwords ),
-                       Title::newMainPage()->getCanonicalUrl(),
+                       '<' . Title::newMainPage()->getCanonicalUrl() . '>',
                        round( $wgNewPasswordExpiry / 86400 )
                );