From 2e29d785da9be8c9ef451fb4a41dd927aaba1d02 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 28 Feb 2010 19:34:23 +0000 Subject: [PATCH] Spell variables correctly --- includes/Preferences.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/Preferences.php b/includes/Preferences.php index daf9309535..a3849385d6 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1261,18 +1261,18 @@ class Preferences { ); if( $wgEnableEmail ) { - $newadr = $formData['emailaddress']; - $oldadr = $wgUser->getEmail(); - if( ( $newadr != '' ) && ( $newadr != $oldadr ) ) { + $newaddr = $formData['emailaddress']; + $oldaddr = $wgUser->getEmail(); + if( ( $newaddr != '' ) && ( $newaddr != $oldaddr ) ) { # the user has supplied a new email address on the login page # new behaviour: set this new emailaddr from login-page into user database record - $wgUser->setEmail( $newadr ); + $wgUser->setEmail( $newaddr ); # but flag as "dirty" = unauthenticated $wgUser->invalidateEmail(); if( $wgEmailAuthentication ) { # Mail a temporary password to the dirty address. # User can come back through the confirmation URL to re-enable email. - $result = $wgUser->sendConfirmationMail( $oldadr != '' ); + $result = $wgUser->sendConfirmationMail( $oldaddr != '' ); if( WikiError::isError( $result ) ) { return wfMsg( 'mailerror', htmlspecialchars( $result->getMessage() ) ); } elseif( $entryPoint == 'ui' ) { @@ -1280,10 +1280,10 @@ class Preferences { } } } else { - $wgUser->setEmail( $newadr ); + $wgUser->setEmail( $newaddr ); } - if( $oldadr != $newadr ) { - wfRunHooks( 'PrefsEmailAudit', array( $wgUser, $oldadr, $newadr ) ); + if( $oldaddr != $newaddr ) { + wfRunHooks( 'PrefsEmailAudit', array( $wgUser, $oldaddr, $newaddr ) ); } } -- 2.20.1