Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2990,6 +2990,7 @@ |
2991 | 2991 | 'confirmemail_subject', |
2992 | 2992 | 'confirmemail_body', |
2993 | 2993 | 'confirmemail_body_changed', |
| 2994 | + 'confirmemail_body_set', |
2994 | 2995 | 'confirmemail_invalidated', |
2995 | 2996 | 'invalidateemail', |
2996 | 2997 | ), |
Index: trunk/phase3/includes/User.php |
— | — | @@ -2917,10 +2917,10 @@ |
2918 | 2918 | * Generate a new e-mail confirmation token and send a confirmation/invalidation |
2919 | 2919 | * mail to the user's given address. |
2920 | 2920 | * |
2921 | | - * @param $changed Boolean: whether the adress changed |
| 2921 | + * @param $type String: message to send, either "created", "changed" or "set" |
2922 | 2922 | * @return Status object |
2923 | 2923 | */ |
2924 | | - function sendConfirmationMail( $changed = false ) { |
| 2924 | + function sendConfirmationMail( $type = 'created' ) { |
2925 | 2925 | global $wgLang; |
2926 | 2926 | $expiration = null; // gets passed-by-ref and defined in next line. |
2927 | 2927 | $token = $this->confirmationToken( $expiration ); |
— | — | @@ -2928,7 +2928,14 @@ |
2929 | 2929 | $invalidateURL = $this->invalidationTokenUrl( $token ); |
2930 | 2930 | $this->saveSettings(); |
2931 | 2931 | |
2932 | | - $message = $changed ? 'confirmemail_body_changed' : 'confirmemail_body'; |
| 2932 | + if ( $type == 'created' || $type === false ) { |
| 2933 | + $message = 'confirmemail_body'; |
| 2934 | + } elseif ( $type === true ) { |
| 2935 | + $message = 'confirmemail_body_changed'; |
| 2936 | + } else { |
| 2937 | + $message = 'confirmemail_body_' . $type; |
| 2938 | + } |
| 2939 | + |
2933 | 2940 | return $this->sendMail( wfMsg( 'confirmemail_subject' ), |
2934 | 2941 | wfMsg( $message, |
2935 | 2942 | wfGetIP(), |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -1288,7 +1288,8 @@ |
1289 | 1289 | if ( $wgEmailAuthentication ) { |
1290 | 1290 | # Mail a temporary password to the dirty address. |
1291 | 1291 | # User can come back through the confirmation URL to re-enable email. |
1292 | | - $result = $wgUser->sendConfirmationMail( $oldaddr != '' ); |
| 1292 | + $type = $oldaddr != '' ? 'changed' : 'set'; |
| 1293 | + $result = $wgUser->sendConfirmationMail( $type ); |
1293 | 1294 | if ( !$result->isGood() ) { |
1294 | 1295 | return htmlspecialchars( $result->getWikiText( 'mailerror' ) ); |
1295 | 1296 | } elseif ( $entryPoint == 'ui' ) { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -4058,6 +4058,20 @@ |
4059 | 4059 | $5 |
4060 | 4060 | |
4061 | 4061 | This confirmation code will expire at $4.', |
| 4062 | +'confirmemail_body_set' => 'Someone, probably you, from IP address $1, |
| 4063 | +has set the e-mail address of the account "$2" to this address on {{SITENAME}}. |
| 4064 | + |
| 4065 | +To confirm that this account really does belong to you and reactivate |
| 4066 | +e-mail features on {{SITENAME}}, open this link in your browser: |
| 4067 | + |
| 4068 | +$3 |
| 4069 | + |
| 4070 | +If the account does *not* belong to you, follow this link |
| 4071 | +to cancel the e-mail address confirmation: |
| 4072 | + |
| 4073 | +$5 |
| 4074 | + |
| 4075 | +This confirmation code will expire at $4.', |
4062 | 4076 | 'confirmemail_invalidated' => 'E-mail address confirmation canceled', |
4063 | 4077 | 'invalidateemail' => 'Cancel e-mail confirmation', |
4064 | 4078 | |