From dce7d386648a71299f2f475a8bc040c132e7d99b Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 2 Oct 2011 21:07:54 +0000 Subject: [PATCH] Followup r98707: apply this logic to signupend too, per a bug comment. --- RELEASE-NOTES-1.18 | 3 ++- includes/specials/SpecialUserlogin.php | 14 +++++++++++--- includes/templates/Userlogin.php | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES-1.18 b/RELEASE-NOTES-1.18 index e57327233d..a9df0f9a81 100644 --- a/RELEASE-NOTES-1.18 +++ b/RELEASE-NOTES-1.18 @@ -221,7 +221,8 @@ production. * (bug 30497) Add client-nojs and client-js classes on document element to let styles easily hide or show things based on general JS availability * (bug 31293) If Special:Userlogin is loaded over HTTPS, display - MediaWiki:loginend-https instead of MediaWiki:loginend, if it's not empty + MediaWiki:loginend-https instead of MediaWiki:loginend, if it's not empty. + Same for signupend on the account creation page. === Bug fixes in 1.18 === * mw.util.getScript has been implemented (like wfScript in GlobalFunctions.php) diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 6080c6c537..05a45e4a57 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1041,12 +1041,20 @@ class LoginForm extends SpecialPage { } // Use loginend-https for HTTPS requests if it's not blank, loginend otherwise - $httpsMsg = wfMessage( 'loginend-https' ); - if ( WebRequest::detectProtocol() == 'https' && !$httpsMsg->isBlank() ) { - $template->set( 'loginend', $httpsMsg->parse() ); + // Ditto for signupend + $usingHTTPS = WebRequest::detectProtocol(); + $loginendHTTPS = wfMessage( 'loginend-https' ); + $signupendHTTPS = wfMessage( 'signupend-https' ); + if ( $usingHTTPS && !$loginendHTTPS->isBlank() ) { + $template->set( 'loginend', $loginendHTTPS->parse() ); } else { $template->set( 'loginend', wfMessage( 'loginend' )->parse() ); } + if ( $usingHTTPS && !$signupendHTTPS->isBlank() ) { + $template->set( 'signupend', $signupendHTTPS->parse() ); + } else { + $template->set( 'signupend', wfMessage( 'signupend' )->parse() ); + } // Give authentication and captcha plugins a chance to modify the form $wgAuth->modifyUITemplate( $template, $this->mType ); diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 1bb8fc38f9..0bfd973799 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -377,7 +377,7 @@ class UsercreateTemplate extends QuickTemplate { haveData( 'token' ) ) { ?> -
msgWiki( 'signupend' ); ?>
+
html( 'signupend' ); ?>