Aryeh was right in r71721.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 19 Dec 2010 22:40:46 +0000 (22:40 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 19 Dec 2010 22:40:46 +0000 (22:40 +0000)
Create two new messages. nocookiesforlogin defaults to nocookieslogin

includes/specials/SpecialUserlogin.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index 6feb4e6..bd8e7ca 100644 (file)
@@ -274,7 +274,7 @@ class LoginForm extends SpecialPage {
                # Request forgery checks.
                if ( !self::getCreateaccountToken() ) {
                        self::setCreateaccountToken();
-                       $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );
+                       $this->mainLoginForm( wfMsgExt( 'nocookiesfornew', array( 'parseinline' ) ) );
                        return false;
                }
 
@@ -659,7 +659,7 @@ class LoginForm extends SpecialPage {
                                break;
 
                        case self::NEED_TOKEN:
-                               $this->mainLoginForm( wfMsgExt( 'nocookieslogin', array( 'parseinline' ) ) );
+                               $this->mainLoginForm( wfMsgExt( 'nocookiesforlogin', array( 'parseinline' ) ) );
                                break;
                        case self::WRONG_TOKEN:
                                $this->mainLoginForm( wfMsg( 'sessionfailure' ) );
index b079503..4172c35 100644 (file)
@@ -1070,9 +1070,12 @@ Please choose a different name.',
 {{SITENAME}} uses cookies to log in users.
 You have cookies disabled.
 Please enable them, then log in with your new username and password.',
+'nocookiesfornew'            => 'The user account wasn\'t created, as we couldn\'t confirm its source.
+Ensure you have cookies enabled, reload this page and try again.',
 'nocookieslogin'             => '{{SITENAME}} uses cookies to log in users.
 You have cookies disabled.
 Please enable them and try again.',
+'nocookiesforlogin'          => '{{int:nocookieslogin}}',
 'noname'                     => 'You have not specified a valid username.',
 'loginsuccesstitle'          => 'Login successful',
 'loginsuccess'               => "'''You are now logged in to {{SITENAME}} as \"\$1\".'''",
index fdc9011..458fcba 100644 (file)
@@ -654,7 +654,9 @@ $1 is a filename, I think.',
 'createaccounterror'         => 'Parameters:
 * $1 is an error message',
 'nocookiesnew'               => "This message is displayed when a new account was successfully created, but the browser doesn't accept cookies.",
+'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.",
 'nocookieslogin'             => "This message is displayed when someone tried to login, but the browser doesn't accept cookies.",
+'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",
 'loginsuccesstitle'          => 'The title of the page saying that you are logged in. The content of the page is the message "[[MediaWiki:Loginsuccess/{{SUBPAGENAME}}]]".',
 '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.
 
index d92818c..117eafc 100644 (file)
@@ -381,6 +381,7 @@ $wgOptionalMessages = array(
        'usermessage-template',
        'revisionmove-backlink',
        'filepage.css',
+       'nocookiesforlogin',
 );
 
 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
index e7a0745..db6b7f1 100644 (file)
@@ -436,6 +436,8 @@ $wgMessageStructure = array(
                'createaccounterror',
                'nocookiesnew',
                'nocookieslogin',
+               'nocookiesfornew',
+               'nocookiesforlogin',
                'noname',
                'loginsuccesstitle',
                'loginsuccess',