r106171 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106170‎ | r106171 | r106172 >
Date:09:41, 14 December 2011
Author:hashar
Status:ok
Tags:
Comment:
Bug 32709: private Wiki users were always taken to Special:Badtitle on login

Follow up r104508 which fixed bug 32276
Modified paths:
  • /branches/REL1_18/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/REL1_18/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18
@@ -19,6 +19,7 @@
2020 * (bug 32853) Fixed CACHE_DBA object cache type.
2121 * (bug 32786) Backward compatibility for extension using 1.17's Database::newFromType()
2222 * Fixed exception when using Special:WhatLinksHere on a Media: file
 23+* (32709) Private Wiki users were always taken to Special:Badtitle on login
2324
2425 == MediaWiki 1.18 ==
2526 2011-11-24
Index: branches/REL1_18/phase3/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() . '-->' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r106206MF REL1_18 to wmf...hashar15:54, 14 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104505* (bug 32276) Skins were generating output using the internal page title whic...reedy23:18, 28 November 2011
r104506* (bug 32276) Skins were generating output using the internal page title whic...reedy23:28, 28 November 2011
r104508* (bug 32276) Skins were generating output using the internal page title whic...reedy23:30, 28 November 2011
r104509* (bug 32276) Skins were generating output using the internal page title whic...reedy23:31, 28 November 2011
r106170Bug 32709: private Wiki users were always taken to Special:Badtitle on login...hashar09:41, 14 December 2011

Status & tagging log