From 6a916e75a3badc47f5e278aff20b8bfd52290a00 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Sun, 11 Nov 2012 20:53:22 -0800 Subject: [PATCH] (bug 42036) Account creation email link needs protocol In other words, use $wgCanonicalServer instead of $wgServer. Change-Id: I110db4d27ce935d732e16830951af0f349e99e99 --- RELEASE-NOTES-1.21 | 2 ++ includes/specials/SpecialUserlogin.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 ); -- 2.20.1