From: Alexandre Emsenhuber Date: Tue, 15 Nov 2011 18:26:05 +0000 (+0000) Subject: Moved read only check after permissions and block so that the user doesn't think... X-Git-Tag: 1.31.0-rc.0~26486 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=6a3f3fb6e4478fcc75cc378f26b46fcb1436f8a5;p=lhc%2Fweb%2Fwiklou.git Moved read only check after permissions and block so that the user doesn't think the error is temporary in case he doesn't have the permission and the database is in read only mode --- diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 1c092daf30..60ed5dde84 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -828,10 +828,6 @@ abstract class FormSpecialPage extends SpecialPage { * @throws ErrorPageError */ protected function checkExecutePermissions( User $user ) { - if ( $this->requiresWrite() ) { - $this->checkReadOnly(); - } - $this->checkPermissions(); if ( $this->requiresUnblock() && $user->isBlocked() ) { @@ -839,6 +835,10 @@ abstract class FormSpecialPage extends SpecialPage { throw new UserBlockedError( $block ); } + if ( $this->requiresWrite() ) { + $this->checkReadOnly(); + } + return true; }