r106206 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106205‎ | r106206 | r106207 >
Date:15:54, 14 December 2011
Author:hashar
Status:ok
Tags:
Comment:
MF REL1_18 to wmf

r106171 - bug 32709 :
private Wiki users were always taken to Special:Badtitle on login
Modified paths:
  • /branches/wmf/1.18wmf1/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/OutputPage.php
@@ -1966,6 +1966,8 @@
19671967 * Produce the stock "please login to use the wiki" page
19681968 */
19691969 public function loginToUse() {
 1970+ global $wgRequest;
 1971+
19701972 if( $this->getUser()->isLoggedIn() ) {
19711973 throw new PermissionsError( 'read' );
19721974 }
@@ -1975,12 +1977,18 @@
19761978 $this->setRobotPolicy( 'noindex,nofollow' );
19771979 $this->setArticleRelated( false );
19781980
 1981+ $returnto = Title::newFromURL( $wgRequest->getVal( 'title', '' ) );
 1982+ $returntoquery = array();
 1983+ if( $returnto ) {
 1984+ $returntoquery = array( 'returnto' => $returnto->getPrefixedText() );
 1985+ }
 1986+
19791987 $loginTitle = SpecialPage::getTitleFor( 'Userlogin' );
19801988 $loginLink = Linker::linkKnown(
19811989 $loginTitle,
19821990 wfMsgHtml( 'loginreqlink' ),
19831991 array(),
1984 - array( 'returnto' => $this->getTitle()->getPrefixedText() )
 1992+ $returntoquery
19851993 );
19861994 $this->addHTML( wfMessage( 'loginreqpagetext' )->rawParams( $loginLink )->parse() .
19871995 "\n<!--" . $this->getTitle()->getPrefixedUrl() . '-->' );
Property changes on: branches/wmf/1.18wmf1/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
19881996 Merged /branches/REL1_18/phase3/includes/OutputPage.php:r106171

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106170Bug 32709: private Wiki users were always taken to Special:Badtitle on login...hashar09:41, 14 December 2011
r106171Bug 32709: private Wiki users were always taken to Special:Badtitle on login...hashar09:41, 14 December 2011

Status & tagging log