Don't show "Send code" button when email is already confirmed on Special:ConfirmEmail
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sun, 3 Nov 2013 19:51:45 +0000 (20:51 +0100)
committerSam Smith <git@samsmith.io>
Wed, 6 Nov 2013 18:58:29 +0000 (10:58 -0800)
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

RELEASE-NOTES-1.23
includes/specials/SpecialConfirmemail.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

index efb0805..cf51677 100644 (file)
@@ -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
index 3828b1c..6757990 100644 (file)
@@ -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(
                                        "<div class=\"error mw-confirmemail-pending\">\n$1\n</div>",
index 6130bd8..39f0b8a 100644 (file)
@@ -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',
index cb7d38a..aa22fab 100644 (file)
@@ -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]].