From: River Tarnell Date: Wed, 3 Aug 2005 22:49:43 +0000 (+0000) Subject: when whitelistread prevents a page being viewed, add returnto= to the URL X-Git-Tag: 1.6.0~2065 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=ec030e995715ae2e451f1804a7fca6b1ea0e18de;p=lhc%2Fweb%2Fwiklou.git when whitelistread prevents a page being viewed, add returnto= to the URL parameters for Special:Userlogin. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ae4694bc48..df6ff66a8f 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -639,7 +639,11 @@ class OutputPage { $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleFlag( false ); $this->mBodytext = ''; - $this->addWikiText( wfMsg( 'loginreqtext' ) ); + $loginpage = Title::makeTitle(NS_SPECIAL, 'Userlogin'); + $sk = $wgUser->getSkin(); + $loginlink = $sk->makeKnownLinkObj($loginpage, wfMsg('loginreqlink'), + 'returnto=' . htmlspecialchars($wgTitle->getPrefixedDBkey())); + $this->addHTML( wfMsgHtml( 'loginreqpagetext', $loginlink ) ); # We put a comment in the .html file so a Sysop can diagnose the page the # user can't see. diff --git a/languages/Language.php b/languages/Language.php index a4f05489c9..c5b37b2c8f 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -697,7 +697,8 @@ Your IP address is $3. Please include this address in any queries you make. 'whitelistacctitle' => 'You are not allowed to create an account', 'whitelistacctext' => 'To be allowed to create accounts in this Wiki you have to [[Special:Userlogin|log]] in and have the appropriate permissions.', 'loginreqtitle' => 'Login Required', -'loginreqtext' => 'You must [[special:Userlogin|login]] to view other pages.', +'loginreqlink' => 'login', +'loginreqpagetext' => 'You must $1 to view other pages.', 'accmailtitle' => 'Password sent.', 'accmailtext' => "The password for '$1' has been sent to $2.", 'newarticle' => '(New)',