Reverting r45363 "(bug 15320) Show login page if not logged in (for watchlist)"
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Jan 2009 01:49:32 +0000 (01:49 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Jan 2009 01:49:32 +0000 (01:49 +0000)
1) Behavior should be consistent; we don't do this anywhere else.

2) We want to be able to consolidate the login form to a secure location, which this would prevent.

Reverting and resolving WONTFIX.

includes/specials/SpecialWatchlist.php

index 9c9c162..61dd6b3 100644 (file)
@@ -20,14 +20,10 @@ 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;
        }