Pass login link to "whitelistedittext" containing 'returnto' parameter
authorRob Church <robchurch@users.mediawiki.org>
Wed, 26 Apr 2006 09:30:31 +0000 (09:30 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 26 Apr 2006 09:30:31 +0000 (09:30 +0000)
includes/EditPage.php
languages/Messages.php

index d8c4b6f..e6ecac1 100644 (file)
@@ -1313,13 +1313,16 @@ END
         * @todo document
         */
        function userNotLoggedInPage() {
-               global $wgOut;
-
+               global $wgUser, $wgOut;
+               $skin = $wgUser->getSkin();
+               $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' );
+               $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $this->mTitle->getPrefixedText() );
+       
                $wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) );
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
                $wgOut->setArticleRelated( false );
-
-               $wgOut->addWikiText( wfMsg( 'whitelistedittext' ) );
+               
+               $wgOut->addHtml( wfMsgWikiHtml( 'whitelistedittext', $loginLink ) );
                $wgOut->returnToMain( false );
        }
 
index 17b0fc1..6cd24ab 100644 (file)
@@ -371,6 +371,7 @@ Your account has been created. Don't forget to change your {{SITENAME}} preferen
 'alreadyloggedin' => "<strong>User $1, you are already logged in!</strong><br />",
 
 'login'                        => 'Log in',
+'loginshort'   => 'log in',
 'loginprompt'  => 'You must have cookies enabled to log in to {{SITENAME}}.',
 'userlogin'            => 'Log in / create account',
 'logout'               => 'Log out',
@@ -481,7 +482,7 @@ Note that you may not use the "e-mail this user" feature unless you have a valid
 
 Your IP address is $3. Please include this address in any queries you make.',
 'whitelistedittitle' => 'Login required to edit',
-'whitelistedittext' => 'You have to [[Special:Userlogin|login]] to edit pages.',
+'whitelistedittext' => 'You have to $1 to edit pages.',
 'whitelistreadtitle' => 'Login required to read',
 'whitelistreadtext' => 'You have to [[Special:Userlogin|login]] to read pages.',
 'whitelistacctitle' => 'You are not allowed to create an account',
@@ -489,7 +490,7 @@ Your IP address is $3. Please include this address in any queries you make.',
 'confirmedittitle' => 'E-mail confirmation required to edit',
 'confirmedittext' => 'You must confirm your e-mail address before editing pages. Please set and validate your e-mail address through your [[Special:Preferences|user preferences]].',
 'loginreqtitle'        => 'Login Required',
-'loginreqlink' => 'login',
+'loginreqlink' => 'log in',
 'loginreqpagetext'     => 'You must $1 to view other pages.',
 'accmailtitle' => 'Password sent.',
 'accmailtext' => 'The password for "$1" has been sent to $2.',