From 57fd33ff74668f074d19103e0588b1a4a018413a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 15 Jul 2014 23:12:27 +0000 Subject: [PATCH] Revert "Make UserNotLoggedIn redirect to login page" 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 | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/includes/exception/UserNotLoggedIn.php b/includes/exception/UserNotLoggedIn.php index f7a56b5091..9d89009100 100644 --- a/includes/exception/UserNotLoggedIn.php +++ b/includes/exception/UserNotLoggedIn.php @@ -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(); - } } -- 2.20.1