From: Alex Monk Date: Fri, 10 May 2013 21:05:22 +0000 (+0100) Subject: Don't shown red box around unconfirmed email address in preferences if authentication... X-Git-Tag: 1.31.0-rc.0~19706 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=d2a5cf358070429fad6254f6375ace087f2b2ecb Don't shown red box around unconfirmed email address in preferences if authentication is disabled Susan and Base-w in #wikimedia discovered that a red box is always shown around their email address on foundationwiki. This is because the box is shown by default - even when email address authentication is disabled. Change-Id: I0b906b23dec6018bc21a179e2cf950b705100c4c --- diff --git a/includes/Preferences.php b/includes/Preferences.php index 0d765fa56b..972e2c6725 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -409,8 +409,8 @@ class Preferences { $disableEmailPrefs = false; - $emailauthenticationclass = 'mw-email-not-authenticated'; if ( $wgEmailAuthentication ) { + $emailauthenticationclass = 'mw-email-not-authenticated'; if ( $user->getEmail() ) { if ( $user->getEmailAuthenticationTimestamp() ) { // date and time are separate parameters to facilitate localisation. @@ -449,8 +449,8 @@ class Preferences { # Apply the same CSS class used on the input to the message: 'cssclass' => $emailauthenticationclass, ); + $defaultPreferences['emailaddress']['cssclass'] = $emailauthenticationclass; } - $defaultPreferences['emailaddress']['cssclass'] = $emailauthenticationclass; if ( $wgEnableUserEmail && $user->isAllowed( 'sendemail' ) ) { $defaultPreferences['disablemail'] = array(