Merge "Make UserNotLoggedIn redirect to login page"
This commit is contained in:
commit
e651fb9335
1 changed files with 16 additions and 0 deletions
|
|
@ -62,4 +62,20 @@ 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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue