From: Aaron Schulz Date: Sat, 3 Jan 2009 06:25:24 +0000 (+0000) Subject: (bug 15320) Show login page if not logged in (for watchlist) X-Git-Tag: 1.31.0-rc.0~43587 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=8e8cc38a745dda3ddf2db2e1f59152eb594227bc;p=lhc%2Fweb%2Fwiklou.git (bug 15320) Show login page if not logged in (for watchlist) --- diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 61dd6b3eea..9c9c1620e7 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -20,10 +20,14 @@ function wfSpecialWatchlist( $par ) { # Anons don't get a watchlist if( $wgUser->isAnon() ) { - $wgOut->setPageTitle( wfMsg( 'watchnologin' ) ); $llink = $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Userlogin' ), wfMsgHtml( 'loginreqlink' ), 'returnto=' . $specialTitle->getPrefixedUrl() ); $wgOut->addHTML( wfMsgWikiHtml( 'watchlistanontext', $llink ) ); + # Add login form for convenience + $form = new LoginForm( $wgRequest ); + $form->execute(); + # Set page title (also LoginForm sets it too, but we prefer this one) + $wgOut->setPageTitle( wfMsg( 'watchnologin' ) ); return; }