Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | * (bug 32853) Fixed CACHE_DBA object cache type. |
21 | 21 | * (bug 32786) Backward compatibility for extension using 1.17's Database::newFromType() |
22 | 22 | * Fixed exception when using Special:WhatLinksHere on a Media: file |
| 23 | +* (32709) Private Wiki users were always taken to Special:Badtitle on login |
23 | 24 | |
24 | 25 | == MediaWiki 1.18 == |
25 | 26 | 2011-11-24 |
Index: branches/REL1_18/phase3/includes/OutputPage.php |
— | — | @@ -1966,6 +1966,8 @@ |
1967 | 1967 | * Produce the stock "please login to use the wiki" page |
1968 | 1968 | */ |
1969 | 1969 | public function loginToUse() { |
| 1970 | + global $wgRequest; |
| 1971 | + |
1970 | 1972 | if( $this->getUser()->isLoggedIn() ) { |
1971 | 1973 | throw new PermissionsError( 'read' ); |
1972 | 1974 | } |
— | — | @@ -1975,12 +1977,18 @@ |
1976 | 1978 | $this->setRobotPolicy( 'noindex,nofollow' ); |
1977 | 1979 | $this->setArticleRelated( false ); |
1978 | 1980 | |
| 1981 | + $returnto = Title::newFromURL( $wgRequest->getVal( 'title', '' ) ); |
| 1982 | + $returntoquery = array(); |
| 1983 | + if( $returnto ) { |
| 1984 | + $returntoquery = array( 'returnto' => $returnto->getPrefixedText() ); |
| 1985 | + } |
| 1986 | + |
1979 | 1987 | $loginTitle = SpecialPage::getTitleFor( 'Userlogin' ); |
1980 | 1988 | $loginLink = Linker::linkKnown( |
1981 | 1989 | $loginTitle, |
1982 | 1990 | wfMsgHtml( 'loginreqlink' ), |
1983 | 1991 | array(), |
1984 | | - array( 'returnto' => $this->getTitle()->getPrefixedText() ) |
| 1992 | + $returntoquery |
1985 | 1993 | ); |
1986 | 1994 | $this->addHTML( wfMessage( 'loginreqpagetext' )->rawParams( $loginLink )->parse() . |
1987 | 1995 | "\n<!--" . $this->getTitle()->getPrefixedUrl() . '-->' ); |