From: Rob Church Date: Tue, 2 May 2006 16:53:32 +0000 (+0000) Subject: When showing the "login to edit" page, set the auto-return to go back to the article... X-Git-Tag: 1.31.0-rc.0~57273 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=3c9a923eaf3bd858a523c17bd650b17acda0e551;p=lhc%2Fweb%2Fwiklou.git When showing the "login to edit" page, set the auto-return to go back to the article, not the main page --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 72ea4445c9..4fa5818639 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1310,11 +1310,12 @@ END } /** - * @todo document + * Produce the stock "please login to edit pages" page */ function userNotLoggedInPage() { global $wgUser, $wgOut; $skin = $wgUser->getSkin(); + $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' ); $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $this->mTitle->getPrefixedUrl() ); @@ -1323,7 +1324,7 @@ END $wgOut->setArticleRelated( false ); $wgOut->addHtml( wfMsgWikiHtml( 'whitelistedittext', $loginLink ) ); - $wgOut->returnToMain( false ); + $wgOut->returnToMain( false, $this->mTitle->getPrefixedUrl() ); } /**