r98558 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98557‎ | r98558 | r98559 >
Date:20:36, 30 September 2011
Author:mah
Status:ok
Tags:
Comment:
re r92924 andFix Bug #31283 - "Change E-mail" option in Preference should be hidden
when AuthPlugin#allowEmailChange() returns false

Patch from Rusty Burchfield
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -147,6 +147,7 @@
148148 * rgcjonas
149149 * Robert Treat
150150 * RockMFR
 151+* Rusty Burchfield
151152 * Salvatore Ingala
152153 * Scott Colcord
153154 * Simon Walker
Index: trunk/phase3/includes/Preferences.php
@@ -356,12 +356,15 @@
357357 array(),
358358 array( 'returnto' => SpecialPage::getTitleFor( 'Preferences' ) ) );
359359
 360+ $emailAddress = $user->getEmail() ? htmlspecialchars( $user->getEmail() ) : '';
 361+ if ( $wgAuth->allowPropChange( 'emailaddress' ) ) {
 362+ $emailAddress .= $emailAddress == '' ? $link : " ($link)";
 363+ }
 364+
360365 $defaultPreferences['emailaddress'] = array(
361366 'type' => 'info',
362367 'raw' => true,
363 - 'default' => $user->getEmail()
364 - ? htmlspecialchars( $user->getEmail() ) . " ($link)"
365 - : $link,
 368+ 'default' => $emailAddress,
366369 'label-message' => 'youremail',
367370 'section' => 'personal/email',
368371 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r98559(bug 31283) Made ChangeEmail check $wgAuth->allowPropChange( 'emailaddress' )...aaron20:43, 30 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92924* Moved email changing from sp:Preferences to new sp:ChangeEmail, which requi...aaron00:48, 23 July 2011

Status & tagging log