(bug 31293) If Special:Userlogin is loaded over HTTPS, display MediaWiki:loginend...
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 2 Oct 2011 20:02:35 +0000 (20:02 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 2 Oct 2011 20:02:35 +0000 (20:02 +0000)
RELEASE-NOTES-1.18
includes/specials/SpecialUserlogin.php
includes/templates/Userlogin.php

index 0e1404f..39b711e 100644 (file)
@@ -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)
index 8ef0d1d..c816979 100644 (file)
@@ -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 );
index 2b9ff3f..1bb8fc3 100644 (file)
@@ -152,7 +152,7 @@ class UserloginTemplate extends QuickTemplate {
 <?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
 </form>
 </div>
-<div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
+<div id="loginend"><?php $this->html( 'loginend' ); ?></div>
 <?php
 
        }