Revert "Make UserNotLoggedIn redirect to login page"
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 15 Jul 2014 23:12:27 +0000 (23:12 +0000)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 15 Jul 2014 23:13:17 +0000 (23:13 +0000)
Lots of small issues that could be very annoying:

* Usability regression: the user is not informed *why* they were
  redirected to the login screen. Not even a generic "You must log in
  to complete this action".
* When testing this on my watchlist, after logging in I am now redirected
  to http://localhost/wiki/index.php?title=Watchlist&title=Special%3AWatchlist
  (the title is repeated twice and one of them is incorrect). This
  worked correctly before.
* SpecialPage::requireLogin() needs documentation and code updates.
* A whole ton of messages used in these prompts is now unused.
* Probably needs release notes.

I don't have the time to fix up myself right now, and a WMF
branch cut is looming. Let's just try this again later.

This reverts commit e0af129cbdb7421b4d9d7858cc63125e12f35a4a.

Bug: 15484
Change-Id: I728e477cf6e10b90846ee0b2d9e5087bc3a0af3e

includes/exception/UserNotLoggedIn.php

index f7a56b5..9d89009 100644 (file)
@@ -62,20 +62,4 @@ class UserNotLoggedIn extends ErrorPageError {
        ) {
                parent::__construct( $titleMsg, $reasonMsg, $params );
        }
-
-       /**
-        * Redirect to Special:Userlogin
-        */
-       public function report() {
-               $context = RequestContext::getMain();
-
-               $output = $context->getOutput();
-               $output->redirect( SpecialPage::getTitleFor( 'Userlogin' )->getFullURL( array(
-                       // Return to this page when the user logs in
-                       'returnto' => $context->getTitle()->getText(),
-                       'returntoquery' => wfArrayToCgi( $context->getRequest()->getValues() )
-               ) ) );
-
-               $output->output();
-       }
 }