(bug 5789) Treat "loginreqpagetext" as wikitext
authorRob Church <robchurch@users.mediawiki.org>
Tue, 2 May 2006 15:37:06 +0000 (15:37 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 2 May 2006 15:37:06 +0000 (15:37 +0000)
RELEASE-NOTES
includes/OutputPage.php

index 5b777ff..36336d2 100644 (file)
@@ -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 ==
 
index 1f531a6..4b3710d 100644 (file)
@@ -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<!--" .
-                                               $wgContLang->getNsText( $wgTitle->getNamespace() ) .
-                                               ':' .
-                                               $wgTitle->getDBkey() . '-->' );
-               $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<!--" . $wgTitle->getPrefixedUrl() . "-->" );
+               
+               $this->returnToMain();
        }
 
        function databaseError( $fname, $sql, $error, $errno ) {