r98721 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98720‎ | r98721 | r98722 >
Date:21:46, 2 October 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r98713, r98716, r98718, r98719, r98720
Modified paths:
  • /branches/wmf/1.17wmf1/includes/specials/SpecialUserlogin.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/templates/Userlogin.php (modified) (history)
  • /branches/wmf/1.17wmf1/languages/messages/MessagesEn.php (modified) (history)
  • /branches/wmf/1.17wmf1/maintenance/language/messageTypes.inc (modified) (history)
  • /branches/wmf/1.17wmf1/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/maintenance/language/messages.inc
@@ -444,8 +444,10 @@
445445 'throttled-mailpassword',
446446 'loginstart',
447447 'loginend',
 448+ 'loginend-https',
448449 'signupstart',
449450 'signupend',
 451+ 'signupend-https',
450452 'mailerror',
451453 'acct_creation_throttle_hit',
452454 'emailauthenticated',
Index: branches/wmf/1.17wmf1/maintenance/language/messageTypes.inc
@@ -89,6 +89,7 @@
9090 'history_copyright',
9191 'licenses',
9292 'loginstart',
 93+ 'loginend-https',
9394 'loginend',
9495 'loginlanguagelinks',
9596 'pear-mail-error',
@@ -111,6 +112,7 @@
112113 'signature-anon',
113114 'signupstart',
114115 'signupend',
 116+ 'signupend-https',
115117 'sitenotice',
116118 'sitesubtitle',
117119 'sitetitle',
Index: branches/wmf/1.17wmf1/includes/specials/SpecialUserlogin.php
@@ -1073,13 +1073,21 @@
10741074 $template->set( 'uselang', $this->mLanguage );
10751075 }
10761076
1077 - // Use loginend-https for HTTPS requests if it exists, loginend otherwise
1078 - $httpsMsg = wfMessage( 'loginend-https' );
1079 - if ( WebRequest::detectProtocol() == 'https' && $httpsMsg->exists() ) {
1080 - $template->set( 'loginend', $httpsMsg->parse() );
 1077+ // Use loginend-https for HTTPS requests if it's not blank, loginend otherwise
 1078+ // Ditto for signupend
 1079+ $usingHTTPS = WebRequest::detectProtocol();
 1080+ $loginendHTTPS = wfMessage( 'loginend-https' );
 1081+ $signupendHTTPS = wfMessage( 'signupend-https' );
 1082+ if ( $usingHTTPS && !$loginendHTTPS->isBlank() ) {
 1083+ $template->set( 'loginend', $loginendHTTPS->parse() );
10811084 } else {
10821085 $template->set( 'loginend', wfMessage( 'loginend' )->parse() );
10831086 }
 1087+ if ( $usingHTTPS && !$signupendHTTPS->isBlank() ) {
 1088+ $template->set( 'signupend', $signupendHTTPS->parse() );
 1089+ } else {
 1090+ $template->set( 'signupend', wfMessage( 'signupend' )->parse() );
 1091+ }
10841092
10851093 // Give authentication and captcha plugins a chance to modify the form
10861094 $wgAuth->modifyUITemplate( $template, $this->mType );
Index: branches/wmf/1.17wmf1/includes/templates/Userlogin.php
@@ -365,7 +365,7 @@
366366 <?php if( @$this->haveData( 'token' ) ) { ?><input type="hidden" name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
367367 </form>
368368 </div>
369 -<div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
 369+<div id="signupend"><?php $this->html( 'signupend' ); ?></div>
370370 <?php
371371
372372 }
Index: branches/wmf/1.17wmf1/languages/messages/MessagesEn.php
@@ -1113,8 +1113,10 @@
11141114 To prevent abuse, only one password reminder will be sent per {{PLURAL:$1|hour|$1 hours}}.',
11151115 'loginstart' => '', # do not translate or duplicate this message to other languages
11161116 'loginend' => '', # do not translate or duplicate this message to other languages
 1117+'loginend-https' => '', # do not translate or duplicate this message to other languages
11171118 'signupstart' => '{{int:loginstart}}', # do not translate or duplicate this message to other languages
11181119 'signupend' => '{{int:loginend}}', # do not translate or duplicate this message to other languages
 1120+'signupend-https' => '', # do not translate or duplicate this message to other languages
11191121 'mailerror' => 'Error sending mail: $1',
11201122 'acct_creation_throttle_hit' => 'Visitors to this wiki using your IP address have created {{PLURAL:$1|1 account|$1 accounts}} in the last day, which is the maximum allowed in this time period.
11211123 As a result, visitors using this IP address cannot create any more accounts at the moment.',
Property changes on: branches/wmf/1.17wmf1/languages/messages/MessagesEn.php
___________________________________________________________________
Modified: svn:mergeinfo
11221124 Merged /trunk/phase3/languages/messages/MessagesEn.php:r98713,98716,98718-98720

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
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
r98719Followup r98718: Register new message key with content per chat with Roan and...raymond21:18, 2 October 2011
r98720Fix r98719: in hindsight, this message should be empty by default. Raymond as...catrope21:42, 2 October 2011

Status & tagging log