* (bug 7144) Don't "return to main" from OutputPage::loginToUse() if the the user...
authorRob Church <robchurch@users.mediawiki.org>
Thu, 31 Aug 2006 17:15:30 +0000 (17:15 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 31 Aug 2006 17:15:30 +0000 (17:15 +0000)
RELEASE-NOTES
includes/OutputPage.php

index 4135c1e..b494ff8 100644 (file)
@@ -174,7 +174,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Fix formatting of titles on Special:Undelete
 * (bug 7026) Fix action=raw&templates=expand
 * (bug 6976) Add namespace and direction classes to classic skins
-
+* (bug 7144) Don't "return to main" from OutputPage::loginToUse() if the the user can't
+  read the main page in the first place
 
 == Languages updated ==
 
index 0086770..3dafa2d 100644 (file)
@@ -781,7 +781,11 @@ class OutputPage {
                $this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $loginLink ) );
                $this->addHtml( "\n<!--" . $wgTitle->getPrefixedUrl() . "-->" );
                
-               $this->returnToMain();
+               # Don't return to the main page if the user can't read it
+               # otherwise we'll end up in a pointless loop
+               $mainPage = Title::newFromText( wfMsgForContent( 'mainpage' ) );
+               if( $mainPage->userCanRead() )
+                       $this->returnToMain( true, $mainPage );
        }
 
        /** @obsolete */