Merge "Call method with the same name it's defined with"
authorBrian Wolff <bawolff+wn@gmail.com>
Sat, 16 Nov 2013 02:08:20 +0000 (02:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 16 Nov 2013 02:08:20 +0000 (02:08 +0000)
1  2 
includes/specials/SpecialUserlogin.php

@@@ -219,7 -219,7 +219,7 @@@ class LoginForm extends SpecialPage 
                        return;
                }
  
-               $status = $this->addNewaccountInternal();
+               $status = $this->addNewAccountInternal();
                if ( !$status->isGood() ) {
                        $error = $status->getMessage();
                        $this->mainLoginForm( $error->toString() );
         * @return Status object
         */
        function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
 -              global $wgCanonicalServer, $wgScript, $wgNewPasswordExpiry;
 +              global $wgNewPasswordExpiry;
  
                if ( $u->getEmail() == '' ) {
                        return Status::newFatal( 'noemail', $u->getName() );
                $u->setNewpassword( $np, $throttle );
                $u->saveSettings();
                $userLanguage = $u->getOption( 'language' );
 -              $m = $this->msg( $emailText, $ip, $u->getName(), $np, '<' . $wgCanonicalServer . $wgScript . '>',
 +
 +              $mainPage = Title::newMainPage();
 +              $mainPageUrl = $mainPage->getCanonicalURL();
 +
 +              $m = $this->msg( $emailText, $ip, $u->getName(), $np, '<' . $mainPageUrl . '>',
                        round( $wgNewPasswordExpiry / 86400 ) )->inLanguage( $userLanguage )->text();
                $result = $u->sendMail( $this->msg( $emailTitle )->inLanguage( $userLanguage )->text(), $m );