From 6a3f3fb6e4478fcc75cc378f26b46fcb1436f8a5 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 15 Nov 2011 18:26:05 +0000 Subject: [PATCH] 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 --- includes/SpecialPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.20.1