Index: branches/wmf/1.18wmf1/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() . '-->' ); |
Property changes on: branches/wmf/1.18wmf1/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1988 | 1996 | Merged /branches/REL1_18/phase3/includes/OutputPage.php:r106171 |