r98707 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98706‎ | r98707 | r98708 >
Date:20:02, 2 October 2011
Author:catrope
Status:ok
Tags:
Comment:
(bug 31293) If Special:Userlogin is loaded over HTTPS, display MediaWiki:loginend-https instead of MediaWiki:loginend, if it exists
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/templates/Userlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.18
@@ -220,6 +220,8 @@
221221 User:getDefaultOptions().
222222 * (bug 30497) Add client-nojs and client-js classes on document element
223223 to let styles easily hide or show things based on general JS availability
 224+* (bug 31293) If Special:Userlogin is loaded over HTTPS, display
 225+ MediaWiki:loginend-https instead of MediaWiki:loginend, if it exists
224226
225227 === Bug fixes in 1.18 ===
226228 * mw.util.getScript has been implemented (like wfScript in GlobalFunctions.php)
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -1039,6 +1039,14 @@
10401040 if( $this->mLanguage )
10411041 $template->set( 'uselang', $this->mLanguage );
10421042 }
 1043+
 1044+ // Use loginend-https for HTTPS requests if it exists, loginend otherwise
 1045+ $httpsMsg = wfMessage( 'loginend-https' );
 1046+ if ( WebRequest::detectProtocol() == 'https' && $httpsMsg->exists() ) {
 1047+ $template->set( 'loginend', $httpsMsg->parse() );
 1048+ } else {
 1049+ $template->set( 'loginend', wfMessage( 'loginend' )->parse() );
 1050+ }
10431051
10441052 // Give authentication and captcha plugins a chance to modify the form
10451053 $wgAuth->modifyUITemplate( $template, $this->mType );
Index: trunk/phase3/includes/templates/Userlogin.php
@@ -152,7 +152,7 @@
153153 <?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
154154 </form>
155155 </div>
156 -<div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
 156+<div id="loginend"><?php $this->html( 'loginend' ); ?></div>
157157 <?php
158158
159159 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r987081.17wmf1: MFT r98707catrope20:07, 2 October 2011
r987091.18wmf1: MFT r98707catrope20:07, 2 October 2011
r98713Followup r98707: Register new message key and set it to ignore for translatew...raymond20:44, 2 October 2011
r98716Followup r98707, r98713: check for blankness, not nonexistence. Since r98713 ...catrope20:58, 2 October 2011
r98718Followup r98707: apply this logic to signupend too, per a bug comment.catrope21:07, 2 October 2011
r98762REL1_18 MFT r97806, r97895, r98193, r98194, r98237, r98502, r98656, r98707, r...reedy13:56, 3 October 2011

Status & tagging log