From: Aaron Schulz Date: Sun, 4 Oct 2015 20:35:16 +0000 (-0700) Subject: Clean up Special:Undelete read-only checks X-Git-Tag: 1.31.0-rc.0~9543^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=3f0ec6c5611d9b386a2d6d1ba54fe2489a15e4d0;p=lhc%2Fweb%2Fwiklou.git Clean up Special:Undelete read-only checks * Use the standard SpecialPage method * Show the error when trying to view the form for a page Change-Id: I60a939e7d1a1164db2dc90525a750573be75fbcc --- diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index b168b1225e..00ee327d00 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -1210,6 +1210,8 @@ class SpecialUndelete extends SpecialPage { } protected function showHistory() { + $this->checkReadOnly(); + $out = $this->getOutput(); if ( $this->mAllowed ) { $out->addModules( 'mediawiki.special.undelete' ); @@ -1639,9 +1641,7 @@ class SpecialUndelete extends SpecialPage { throw new ErrorPageError( 'undelete-error', 'filedelete-maintenance' ); } - if ( wfReadOnly() ) { - throw new ReadOnlyError; - } + $this->checkReadOnly(); $out = $this->getOutput(); $archive = new PageArchive( $this->mTargetObj, $this->getConfig() );