From: Rob Church Date: Thu, 31 Aug 2006 17:15:30 +0000 (+0000) Subject: * (bug 7144) Don't "return to main" from OutputPage::loginToUse() if the the user... X-Git-Tag: 1.31.0-rc.0~55865 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=370e18703c760e804f04e6da6a9d0a4e25fe3e4e;p=lhc%2Fweb%2Fwiklou.git * (bug 7144) Don't "return to main" from OutputPage::loginToUse() if the the user can't read the main page in the first place --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4135c1ea18..b494ff8de9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 00867701a7..3dafa2df2c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -781,7 +781,11 @@ class OutputPage { $this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $loginLink ) ); $this->addHtml( "\n" ); - $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 */