From: Brad Jorsch Date: Mon, 12 Nov 2012 04:53:22 +0000 (-0800) Subject: (bug 42036) Account creation email link needs protocol X-Git-Tag: 1.31.0-rc.0~21658 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=6a916e75a3badc47f5e278aff20b8bfd52290a00;p=lhc%2Fweb%2Fwiklou.git (bug 42036) Account creation email link needs protocol In other words, use $wgCanonicalServer instead of $wgServer. Change-Id: I110db4d27ce935d732e16830951af0f349e99e99 --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index b9b026cb37..923df754f4 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -61,6 +61,8 @@ production. * (bug 41793) Contribution links to users with 0 edits on Special:ListUsers didn't show up red. * (bug 41899) A PHP notice no longer occurs when using the "rvcontinue" API parameter. +* (bug 42036) Account creation emails now contain canonical (not + protocol-relative) URLs. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index f80e7da908..c077c4d411 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -855,7 +855,7 @@ class LoginForm extends SpecialPage { * @return Status object */ function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) { - global $wgServer, $wgScript, $wgNewPasswordExpiry; + global $wgCanonicalServer, $wgScript, $wgNewPasswordExpiry; if ( $u->getEmail() == '' ) { return Status::newFatal( 'noemail', $u->getName() ); @@ -872,7 +872,7 @@ class LoginForm extends SpecialPage { $u->setNewpassword( $np, $throttle ); $u->saveSettings(); $userLanguage = $u->getOption( 'language' ); - $m = $this->msg( $emailText, $ip, $u->getName(), $np, '<' . $wgServer . $wgScript . '>', + $m = $this->msg( $emailText, $ip, $u->getName(), $np, '<' . $wgCanonicalServer . $wgScript . '>', round( $wgNewPasswordExpiry / 86400 ) )->inLanguage( $userLanguage )->text(); $result = $u->sendMail( $this->msg( $emailTitle )->inLanguage( $userLanguage )->text(), $m );