r78613 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78612‎ | r78613 | r78614 >
Date:22:40, 19 December 2010
Author:platonides
Status:ok
Tags:
Comment:
Aryeh was right in r71721.
Create two new messages. nocookiesforlogin defaults to nocookieslogin
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -436,6 +436,8 @@
437437 'createaccounterror',
438438 'nocookiesnew',
439439 'nocookieslogin',
 440+ 'nocookiesfornew',
 441+ 'nocookiesforlogin',
440442 'noname',
441443 'loginsuccesstitle',
442444 'loginsuccess',
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -381,6 +381,7 @@
382382 'usermessage-template',
383383 'revisionmove-backlink',
384384 'filepage.css',
 385+ 'nocookiesforlogin',
385386 );
386387
387388 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -274,7 +274,7 @@
275275 # Request forgery checks.
276276 if ( !self::getCreateaccountToken() ) {
277277 self::setCreateaccountToken();
278 - $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );
 278+ $this->mainLoginForm( wfMsgExt( 'nocookiesfornew', array( 'parseinline' ) ) );
279279 return false;
280280 }
281281
@@ -659,7 +659,7 @@
660660 break;
661661
662662 case self::NEED_TOKEN:
663 - $this->mainLoginForm( wfMsgExt( 'nocookieslogin', array( 'parseinline' ) ) );
 663+ $this->mainLoginForm( wfMsgExt( 'nocookiesforlogin', array( 'parseinline' ) ) );
664664 break;
665665 case self::WRONG_TOKEN:
666666 $this->mainLoginForm( wfMsg( 'sessionfailure' ) );
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -654,7 +654,9 @@
655655 'createaccounterror' => 'Parameters:
656656 * $1 is an error message',
657657 'nocookiesnew' => "This message is displayed when a new account was successfully created, but the browser doesn't accept cookies.",
 658+'nocookiesfornew' => "This message is displayed when the user tried to create a new account, but it failed the CSRF check. It could be blocking an attack, but most likely, the browser isn't accepting cookies.",
658659 'nocookieslogin' => "This message is displayed when someone tried to login, but the browser doesn't accept cookies.",
 660+'nocookiesforlogin' => "This message is displayed when someone tried to login and the CSRF failed (most likely, the browser doesn't accept cookies). Defaults to nocookieslogin",
659661 'loginsuccesstitle' => 'The title of the page saying that you are logged in. The content of the page is the message "[[MediaWiki:Loginsuccess/{{SUBPAGENAME}}]]".',
660662 'loginsuccess' => 'The content of the page saying that you are logged in. The title of the page is "[[MediaWiki:Loginsuccesstitle/{{SUBPAGENAME}}|{{int:loginsuccesstitle}}]]". $1 is the name of the logged in user.
661663
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1070,9 +1070,12 @@
10711071 {{SITENAME}} uses cookies to log in users.
10721072 You have cookies disabled.
10731073 Please enable them, then log in with your new username and password.',
 1074+'nocookiesfornew' => 'The user account wasn\'t created, as we couldn\'t confirm its source.
 1075+Ensure you have cookies enabled, reload this page and try again.',
10741076 'nocookieslogin' => '{{SITENAME}} uses cookies to log in users.
10751077 You have cookies disabled.
10761078 Please enable them and try again.',
 1079+'nocookiesforlogin' => '{{int:nocookieslogin}}',
10771080 'noname' => 'You have not specified a valid username.',
10781081 'loginsuccesstitle' => 'Login successful',
10791082 'loginsuccess' => "'''You are now logged in to {{SITENAME}} as \"\$1\".'''",

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71721When the CSRF token on is not available in the session, show the ...platonides18:28, 26 August 2010

Status & tagging log