mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 15:36:58 +00:00
special: Check login permissions before calling execute method
Calling the parent method first means the form has to be built (as well as various other things) and then it cannot be shown because of permission and the user is redirected. This also lead to confusing behavior where some code paths are reached even though the user cannot actually access the page. Change-Id: If354d98f9e51acef38cac114a7704d28c148017b
This commit is contained in:
parent
a76cc44a60
commit
4303ab5f71
|
@ -25,13 +25,13 @@ class SpecialNotificationsMarkRead extends FormSpecialPage {
|
|||
}
|
||||
|
||||
public function execute( $par ) {
|
||||
// Redirect to login page and inform user of the need to login
|
||||
$this->requireLogin( 'echo-notification-loginrequired' );
|
||||
|
||||
parent::execute( $par );
|
||||
|
||||
$out = $this->getOutput();
|
||||
$out->setPageTitleMsg( $this->msg( 'echo-specialpage-markasread' ) );
|
||||
|
||||
// Redirect to login page and inform user of the need to login
|
||||
$this->requireLogin( 'echo-notification-loginrequired' );
|
||||
}
|
||||
|
||||
public function isListed() {
|
||||
|
|
Loading…
Reference in a new issue