From c2a041139ac4bf9e6a6754d95d08f02b1bee38ac Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 12 Oct 2011 09:09:00 +0000 Subject: [PATCH] Check for read only database after checking if the user is logged in, so that anonymous users accessing this page while the wiki is read only won't think this is a temporary error --- includes/specials/SpecialEditWatchlist.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index af8e71f4cb..5b9dd7ca83 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -28,10 +28,6 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * @param $mode int */ public function execute( $mode ) { - if( wfReadOnly() ) { - throw new ReadOnlyError; - } - $this->setHeaders(); $out = $this->getOutput(); @@ -49,6 +45,10 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { return; } + if ( wfReadOnly() ) { + throw new ReadOnlyError; + } + $this->outputHeader(); $sub = wfMsgExt( -- 2.20.1