From: Alexandre Emsenhuber Date: Sun, 3 Nov 2013 19:51:45 +0000 (+0100) Subject: Don't show "Send code" button when email is already confirmed on Special:ConfirmEmail X-Git-Tag: 1.31.0-rc.0~18266^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=6466afa9faf34f8bc0cb4e4ce6883ea4b1de9f64;p=lhc%2Fweb%2Fwiklou.git Don't show "Send code" button when email is already confirmed on Special:ConfirmEmail Also, consistently use "confirmed", rather than "authenticated", in the Special:ConfirmEmail and Special:Preferences UI, when messaging whether or not the user has confirmed an email address. Bug: 56443 Change-Id: I6fca42ea4568c13bca6b10e19d17e023ed0eacca --- diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index efb0805671..cf516774e5 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -35,6 +35,10 @@ production. changes and watchlist) and the talk page message indicator are now correctly updated when the user is viewing old revisions of pages, instead of always acting as if the latest revision was being viewed. +* (bug 56443) Special:ConfirmEmail no longer shows a "Mail a confirmation code" + when the email address is already confirmed. Also, consistently use + "confirmed", rather than "authenticated", when messaging whether or not the + user has confirmed an email address. === API changes in 1.23 === * (bug 54884) action=parse&prop=categories now indicates hidden and missing diff --git a/includes/specials/SpecialConfirmemail.php b/includes/specials/SpecialConfirmemail.php index 3828b1c657..6757990afd 100644 --- a/includes/specials/SpecialConfirmemail.php +++ b/includes/specials/SpecialConfirmemail.php @@ -90,19 +90,17 @@ class EmailConfirmation extends UnlistedSpecialPage { } else { $out->addWikiText( $status->getWikiText( 'confirmemail_sendfailed' ) ); } + } elseif ( $user->isEmailConfirmed() ) { + // date and time are separate parameters to facilitate localisation. + // $time is kept for backward compat reasons. + // 'emailauthenticated' is also used in SpecialPreferences.php + $lang = $this->getLanguage(); + $emailAuthenticated = $user->getEmailAuthenticationTimestamp(); + $time = $lang->userTimeAndDate( $emailAuthenticated, $user ); + $d = $lang->userDate( $emailAuthenticated, $user ); + $t = $lang->userTime( $emailAuthenticated, $user ); + $out->addWikiMsg( 'emailauthenticated', $time, $d, $t ); } else { - if ( $user->isEmailConfirmed() ) { - // date and time are separate parameters to facilitate localisation. - // $time is kept for backward compat reasons. - // 'emailauthenticated' is also used in SpecialPreferences.php - $lang = $this->getLanguage(); - $emailAuthenticated = $user->getEmailAuthenticationTimestamp(); - $time = $lang->userTimeAndDate( $emailAuthenticated, $user ); - $d = $lang->userDate( $emailAuthenticated, $user ); - $t = $lang->userTime( $emailAuthenticated, $user ); - $out->addWikiMsg( 'emailauthenticated', $time, $d, $t ); - } - if ( $user->isEmailConfirmationPending() ) { $out->wrapWikiMsg( "
\n$1\n
", diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 6130bd88f8..39f0b8a265 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1228,8 +1228,8 @@ To prevent abuse, only one password reset email will be sent per {{PLURAL:$1|hou 'mailerror' => 'Error sending mail: $1', 'acct_creation_throttle_hit' => 'Visitors to this wiki using your IP address have created {{PLURAL:$1|1 account|$1 accounts}} in the last day, which is the maximum allowed in this time period. As a result, visitors using this IP address cannot create any more accounts at the moment.', -'emailauthenticated' => 'Your email address was authenticated on $2 at $3.', -'emailnotauthenticated' => 'Your email address is not yet authenticated. +'emailauthenticated' => 'Your email address was confirmed on $2 at $3.', +'emailnotauthenticated' => 'Your email address is not yet confirmed. No email will be sent for any of the following features.', 'noemailprefs' => 'Specify an email address in your preferences for these features to work.', 'emailconfirmlink' => 'Confirm your email address', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index cb7d38a36a..aa22fab913 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -1521,7 +1521,7 @@ Parameters: * $3 - time', 'emailnotauthenticated' => 'Message in [[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}. -It appears after saving your email address but before it has been authenticated.', +It appears after saving your email address but before you confirm it.', 'noemailprefs' => 'Message appearing in the "Email options" section of the "User profile" page in [[Special:Preferences|Preferences]], when no user email address has been entered.', 'emailconfirmlink' => 'Link to [[Special:ConfirmEmail]].