Use accessor instead of the member variable directly and factorise the calls to it
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 21 Dec 2011 18:40:02 +0000 (18:40 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 21 Dec 2011 18:40:02 +0000 (18:40 +0000)
includes/specials/SpecialConfirmemail.php

index c648249..912f773 100644 (file)
@@ -88,9 +88,10 @@ class EmailConfirmation extends UnlistedSpecialPage {
                                // $time is kept for backward compat reasons.
                                // 'emailauthenticated' is also used in SpecialPreferences.php
                                $lang = $this->getLanguage();
-                               $time = $lang->userTimeAndDate( $user->mEmailAuthenticated, $user );
-                               $d = $lang->userDate( $user->mEmailAuthenticated, $user );
-                               $t = $lang->userTime( $user->mEmailAuthenticated, $user );
+                               $emailAuthenticated = $user->getEmailAuthenticationTimestamp();
+                               $time = $lang->userTimeAndDate( $emailAuthenticated, $user );
+                               $d = $lang->userDate( $emailAuthenticated, $user );
+                               $t = $lang->userTime( $emailAuthenticated, $user );
                                $out->addWikiMsg( 'emailauthenticated', $time, $d, $t );
                        }
                        if( $user->isEmailConfirmationPending() ) {