Followup r98707: apply this logic to signupend too, per a bug comment.
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 2 Oct 2011 21:07:54 +0000 (21:07 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 2 Oct 2011 21:07:54 +0000 (21:07 +0000)
RELEASE-NOTES-1.18
includes/specials/SpecialUserlogin.php
includes/templates/Userlogin.php

index e573272..a9df0f9 100644 (file)
@@ -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)
index 6080c6c..05a45e4 100644 (file)
@@ -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 );
index 1bb8fc3..0bfd973 100644 (file)
@@ -377,7 +377,7 @@ class UsercreateTemplate extends QuickTemplate {
 <?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
 </form>
 </div>
-<div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
+<div id="signupend"><?php $this->html( 'signupend' ); ?></div>
 <?php
 
        }