From: Roan Kattouw Date: Sun, 2 Oct 2011 20:02:35 +0000 (+0000) Subject: (bug 31293) If Special:Userlogin is loaded over HTTPS, display MediaWiki:loginend... X-Git-Tag: 1.31.0-rc.0~27308 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=c0e718d43f62e645f8b301256d461eeadb7472d4;p=lhc%2Fweb%2Fwiklou.git (bug 31293) If Special:Userlogin is loaded over HTTPS, display MediaWiki:loginend-https instead of MediaWiki:loginend, if it exists --- diff --git a/RELEASE-NOTES-1.18 b/RELEASE-NOTES-1.18 index 0e1404fd53..39b711eb93 100644 --- a/RELEASE-NOTES-1.18 +++ b/RELEASE-NOTES-1.18 @@ -220,6 +220,8 @@ production. User:getDefaultOptions(). * (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 exists === 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 8ef0d1dd34..c816979103 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1039,6 +1039,14 @@ class LoginForm extends SpecialPage { if( $this->mLanguage ) $template->set( 'uselang', $this->mLanguage ); } + + // Use loginend-https for HTTPS requests if it exists, loginend otherwise + $httpsMsg = wfMessage( 'loginend-https' ); + if ( WebRequest::detectProtocol() == 'https' && $httpsMsg->exists() ) { + $template->set( 'loginend', $httpsMsg->parse() ); + } else { + $template->set( 'loginend', wfMessage( 'loginend' )->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 2b9ff3f7ba..1bb8fc38f9 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -152,7 +152,7 @@ class UserloginTemplate extends QuickTemplate { haveData( 'token' ) ) { ?> -
msgWiki( 'loginend' ); ?>
+
html( 'loginend' ); ?>