Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2499,6 +2499,7 @@ |
2500 | 2500 | 'noconvertlink' => 0, |
2501 | 2501 | 'gender' => 'unknown', |
2502 | 2502 | 'ccmeonemails' => 0, |
| 2503 | + 'disablemail' => 0, |
2503 | 2504 | ); |
2504 | 2505 | |
2505 | 2506 | /** Whether or not to allow and use real name fields. Defaults to true. */ |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -220,11 +220,44 @@ |
221 | 221 | |
222 | 222 | ## Email ####################################### |
223 | 223 | ## Email stuff |
224 | | - global $wgEnableEmail, $wgEnableUserEmail; |
| 224 | + global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication; |
| 225 | + |
| 226 | + if ( $wgEmailAuthentication ) { |
| 227 | + if ( $user->getEmail() ) { |
| 228 | + if( $user->getEmailAuthenticationTimestamp() ) { |
| 229 | + // date and time are separate parameters to facilitate localisation. |
| 230 | + // $time is kept for backward compat reasons. |
| 231 | + // 'emailauthenticated' is also used in SpecialConfirmemail.php |
| 232 | + $time = $wgLang->timeAndDate( $user->getEmailAuthenticationTimestamp(), true ); |
| 233 | + $d = $wgLang->date( $user->getEmailAuthenticationTimestamp(), true ); |
| 234 | + $t = $wgLang->time( $user->getEmailAuthenticationTimestamp(), true ); |
| 235 | + $emailauthenticated = wfMsg('emailauthenticated', $time, $d, $t ).'<br />'; |
| 236 | + $disableEmailPrefs = false; |
| 237 | + } else { |
| 238 | + $disableEmailPrefs = true; |
| 239 | + $skin = $wgUser->getSkin(); |
| 240 | + $emailauthenticated = wfMsg('emailnotauthenticated').'<br />' . |
| 241 | + $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Confirmemail' ), |
| 242 | + wfMsg( 'emailconfirmlink' ) ) . '<br />'; |
| 243 | + } |
| 244 | + } else { |
| 245 | + $emailauthenticated = wfMsg( 'noemailprefs' ); |
| 246 | + } |
| 247 | + |
| 248 | + $defaultPreferences['emailauthentication'] = |
| 249 | + array( |
| 250 | + 'type' => 'info', |
| 251 | + 'raw' => true, |
| 252 | + 'section' => 'email', |
| 253 | + 'label-message' => 'prefs-emailconfirm-label', |
| 254 | + 'default' => $emailauthenticated, |
| 255 | + ); |
| 256 | + |
| 257 | + } |
| 258 | + |
225 | 259 | if ($wgEnableEmail) { |
226 | | - |
227 | 260 | if ($wgEnableUserEmail) { |
228 | | - $defaultPreferences['disableemail'] = |
| 261 | + $defaultPreferences['disablemail'] = |
229 | 262 | array( |
230 | 263 | 'type' => 'toggle', |
231 | 264 | 'invert' => true, |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1611,6 +1611,7 @@ |
1612 | 1612 | 'prefs-custom-js' => 'Custom JS', |
1613 | 1613 | 'prefs-reset-intro' => 'You can use this page to reset your preferences to the site defaults. |
1614 | 1614 | This cannot be undone.', |
| 1615 | +'prefs-emailconfirm-label' => 'Email confirmation:', |
1615 | 1616 | |
1616 | 1617 | # User rights |
1617 | 1618 | 'userrights' => 'User rights management', |