From: Alexandre Emsenhuber Date: Wed, 12 Oct 2011 09:09:00 +0000 (+0000) Subject: Check for read only database after checking if the user is logged in, so that anonymo... X-Git-Tag: 1.31.0-rc.0~27133 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=c2a041139ac4bf9e6a6754d95d08f02b1bee38ac;p=lhc%2Fweb%2Fwiklou.git 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 --- 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(