Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/63225


Change subject: Don't shown red box around unconfirmed email address in 
preferences if authentication is disabled
......................................................................

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
---
M includes/Preferences.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/63225/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index 0d765fa..972e2c6 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -409,8 +409,8 @@
 
                        $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 @@
                                        # 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(

-- 
To view, visit https://gerrit.wikimedia.org/r/63225
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b906b23dec6018bc21a179e2cf950b705100c4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to