From 55532d5a3d57e13ab6590bad3a58d72f2e15fdac Mon Sep 17 00:00:00 2001 From: Rob Church Date: Tue, 2 May 2006 15:37:06 +0000 Subject: [PATCH] (bug 5789) Treat "loginreqpagetext" as wikitext --- RELEASE-NOTES | 1 + includes/OutputPage.php | 31 ++++++++++++++----------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5b777fff08..36336d259b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -184,6 +184,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN show up on specific pages on demand * Bidi-aid on list pages * (bug 5782) Allow entries in the bad image list to use canonical namespace names +* (bug 5789) Treat "loginreqpagetext" as wikitext == Compatibility == diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 1f531a6e75..4b3710d522 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -759,27 +759,24 @@ class OutputPage { $this->returnToMain(); } + /** + * Produce the stock "please login to use the wiki" page + */ function loginToUse() { global $wgUser, $wgTitle, $wgContLang; - + $skin = $wgUser->getSkin(); + $this->setPageTitle( wfMsg( 'loginreqtitle' ) ); - $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); - $this->setRobotpolicy( 'noindex,nofollow' ); + $this->setHtmlTitle( wfMsg( 'errorpagetitle' ) ); + $this->setRobotPolicy( 'noindex,nofollow' ); $this->setArticleFlag( false ); - $this->mBodytext = ''; - $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. - $this->addHTML( "\n' ); - $this->returnToMain(); # Flip back to the main page after 10 seconds. + + $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' ); + $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $wgTitle->getPrefixedUrl() ); + $this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $loginLink ) ); + $this->addHtml( "\n" ); + + $this->returnToMain(); } function databaseError( $fname, $sql, $error, $errno ) { -- 2.20.1