From: jenkins-bot Date: Sat, 12 Dec 2015 17:22:12 +0000 (+0000) Subject: Merge "Fixed Special:PasswordReset message" X-Git-Tag: 1.31.0-rc.0~8721 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=bb3da3829714d17315986b517e5286d73cd2953e;hp=393378d2cb5725104153b0f0faf5840a2bdd2040;p=lhc%2Fweb%2Fwiklou.git Merge "Fixed Special:PasswordReset message" --- diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 53e1d1b9bc..292b575396 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -42,6 +42,11 @@ class SpecialPasswordReset extends FormSpecialPage { */ private $result; + /** + * @var string $method Identifies which password reset field was specified by the user. + */ + private $method; + public function __construct() { parent::__construct( 'PasswordReset', 'editmyprivateinfo' ); } @@ -196,6 +201,8 @@ class SpecialPasswordReset extends FormSpecialPage { return array( $error ); } + $this->method = $method; + if ( count( $users ) == 0 ) { if ( $method == 'email' ) { // Don't reveal whether or not an email address is in use @@ -310,7 +317,12 @@ class SpecialPasswordReset extends FormSpecialPage { $this->getOutput()->addHTML( Html::rawElement( 'pre', array(), $this->email->escaped() ) ); } - $this->getOutput()->addWikiMsg( 'passwordreset-emailsent' ); + if ( $this->method === 'email' ) { + $this->getOutput()->addWikiMsg( 'passwordreset-emailsentemail' ); + } else { + $this->getOutput()->addWikiMsg( 'passwordreset-emailsentusername' ); + } + $this->getOutput()->returnToMain(); } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 75d577dc07..2893f96750 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -554,7 +554,8 @@ "passwordreset-emailtext-ip": "Someone (probably you, from IP address $1) requested a reset of your\npassword for {{SITENAME}} ($4). The following user {{PLURAL:$3|account is|accounts are}}\nassociated with this email address:\n\n$2\n\n{{PLURAL:$3|This temporary password|These temporary passwords}} will expire in {{PLURAL:$5|one day|$5 days}}.\nYou should log in and choose a new password now. If someone else made this\nrequest, or if you have remembered your original password, and you no longer\nwish to change it, you may ignore this message and continue using your old\npassword.", "passwordreset-emailtext-user": "User $1 on {{SITENAME}} requested a reset of your password for {{SITENAME}}\n($4). The following user {{PLURAL:$3|account is|accounts are}} associated with this email address:\n\n$2\n\n{{PLURAL:$3|This temporary password|These temporary passwords}} will expire in {{PLURAL:$5|one day|$5 days}}.\nYou should log in and choose a new password now. If someone else made this\nrequest, or if you have remembered your original password, and you no longer\nwish to change it, you may ignore this message and continue using your old\npassword.", "passwordreset-emailelement": "Username:\n$1\n\nTemporary password:\n$2", - "passwordreset-emailsent": "If this is a registered email address for your account, then a password reset email will be sent.", + "passwordreset-emailsentemail": "If this is a registered email address for your account, then a password reset email will be sent.", + "passwordreset-emailsentusername": "If there is a corresponding registered email address, then a password reset email will be sent.", "passwordreset-emailsent-capture": "A password reset email has been sent, which is shown below.", "passwordreset-emailerror-capture": "A password reset email was generated, which is shown below, but sending it to the {{GENDER:$2|user}} failed: $1", "changeemail": "Change or remove email address", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 93b8cff699..524ac6db80 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -729,9 +729,10 @@ "passwordreset-emailtext-ip": "Be consistent with {{msg-mw|Passwordreset-emailtext-user}}.\n\nParameters:\n* $1 - an IP address\n* $2 - message {{msg-mw|Passwordreset-emailelement}} repeated $3 times\n* $3 - the number of repetitions in $2\n* $4 - base URL of the wiki\n* $5 - number of days", "passwordreset-emailtext-user": "Be consistent with {{msg-mw|Passwordreset-emailtext-ip}}.\n\nParameters:\n* $1 - a user name, no GENDER suport.\n* $2 - message {{msg-mw|Passwordreset-emailelement|notext=1}} repeated $3 times\n* $3 - the number of repetitions in $2\n* $4 - base URL of the wiki\n* $5 - number of days", "passwordreset-emailelement": "This is a body of a password reset email to allow them into the system with a new password. Parameters:\n* $1 - the user's login name. This parameter can be used for GENDER.\n* $2 - the temporary password given by the system", - "passwordreset-emailsent": "Used in [[Special:PasswordReset]].\n\nSee also:\n* {{msg-mw|Passwordreset-emailsent-capture}}\n* {{msg-mw|Passwordreset-emailerror-capture}}", - "passwordreset-emailsent-capture": "Used in [[Special:PasswordReset]].\n\nSee also:\n* {{msg-mw|Passwordreset-emailsent}}\n* {{msg-mw|Passwordreset-emailerror-capture}}", - "passwordreset-emailerror-capture": "Error message displayed in [[Special:PasswordReset]] when sending an email fails. Parameters:\n* $1 - error message\n* $2 - username, used for GENDER\nSee also:\n* {{msg-mw|Passwordreset-emailsent}}\n* {{msg-mw|Passwordreset-emailsent-capture}}", + "passwordreset-emailsentemail": "Used in [[Special:PasswordReset]].\n\nSee also:\n* {{msg-mw|Passwordreset-emailsent-capture}}\n* {{msg-mw|Passwordreset-emailerror-capture}}", + "passwordreset-emailsentusername": "Used in [[Special:PasswordReset]].\n\nSee also:\n* {{msg-mw|Passwordreset-emailsent-capture}}\n* {{msg-mw|Passwordreset-emailerror-capture}}", + "passwordreset-emailsent-capture": "Used in [[Special:PasswordReset]].\n\nSee also:\n* {{msg-mw|Passwordreset-emailsentemail}}\n* {msg-mw|Passwordreset-emailsentusername}}\n* {{msg-mw|Passwordreset-emailerror-capture}}", + "passwordreset-emailerror-capture": "Error message displayed in [[Special:PasswordReset]] when sending an email fails. Parameters:\n* $1 - error message\n* $2 - username, used for GENDER\nSee also:\n* {{msg-mw|Passwordreset-emailsentemail}}\n* {msg-mw|Passwordreset-emailsentusername}}\n* {{msg-mw|Passwordreset-emailsent-capture}}", "changeemail": "Title of [[Special:ChangeEmail|special page]]. This page also allows removing the user's email address.", "changeemail-summary": "{{ignored}}", "changeemail-header": "Text of [[Special:ChangeEmail]].",