From 3f0ec6c5611d9b386a2d6d1ba54fe2489a15e4d0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 4 Oct 2015 13:35:16 -0700 Subject: [PATCH] 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 --- includes/specials/SpecialUndelete.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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() ); -- 2.20.1