From: Roan Kattouw Date: Mon, 5 Sep 2011 19:29:20 +0000 (+0000) Subject: Don't use $wgServer (potentially protocol-relative!) in the password reset e-mail... X-Git-Tag: 1.31.0-rc.0~27894 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=1bc68932af24191beb2729f6fa2b6d46977da3dd;p=lhc%2Fweb%2Fwiklou.git Don't use $wgServer (potentially protocol-relative!) in the password reset e-mail. The documentation calls for $4 to be "the base URL of the wiki" and the code was using $wgServer . $wgScript which produces the URL to index.php , so I decided to use the URL to the Main Page instead. This avoids using globals and doesn't suffer from mixed URL structure issues on secure.wm.o --- diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 476ab05696..5cdb1c04d1 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -152,7 +152,7 @@ class SpecialPasswordReset extends FormSpecialPage { } } - global $wgServer, $wgScript, $wgNewPasswordExpiry; + global $wgNewPasswordExpiry; // All the users will have the same email address if ( $firstUser->getEmail() == '' ) { @@ -190,7 +190,7 @@ class SpecialPasswordReset extends FormSpecialPage { $username, $passwordBlock, count( $passwords ), - $wgServer . $wgScript, + Title::newMainPage()->getCanonicalUrl(), round( $wgNewPasswordExpiry / 86400 ) );