Brian Wolff has submitted this change and it was merged. Change subject: set url used in createaccount-text to main page canonical url ......................................................................
set url used in createaccount-text to main page canonical url $wgScript (index.php) appended to the site url (e.g. https://en.wikipedia.org/w/index.php) seems pointless in the context of these email messages. Change-Id: I1ae1ef164aa2db66e9370640e1e7dbddbed811c2 --- M includes/specials/SpecialUserlogin.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 5ac3e65..db77399 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -865,7 +865,7 @@ * @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() ); @@ -882,7 +882,11 @@ $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 ); -- To view, visit https://gerrit.wikimedia.org/r/92251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ae1ef164aa2db66e9370640e1e7dbddbed811c2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude <[email protected]> Gerrit-Reviewer: Aude <[email protected]> Gerrit-Reviewer: Bartosz DziewoĆski <[email protected]> Gerrit-Reviewer: Brian Wolff <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
