From fcaf44489ef8449070f65e46f1589d7ee9027cff Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 21 Mar 2008 04:50:34 +0000 Subject: [PATCH] Don't show checkbox is the user can't use it --- includes/SpecialUndelete.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index f56beb4285..2f56ae88a5 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -972,6 +972,18 @@ class UndeleteForm { # Format the user-visible controls (comment field, submission button) # in a nice little table $align = $wgContLang->isRtl() ? 'left' : 'right'; + if( $wgUser->isAllowed( 'oversight' ) ) { + $unsuppressBox = + " +   + " . + Xml::check( 'wpUnsuppress', $this->mUnsuppress, array('id' => 'mw-undelete-unsupress') ) . ' ' . + Xml::label( wfMsgHtml('revdelete-unsuppress'), 'mw-undelete-unsupress' ) . + " + "; + } else { + $unsuppressBox = ""; + } $table = Xml::openElement( 'fieldset' ) . Xml::element( 'legend', null, wfMsg( 'undelete') ). @@ -995,14 +1007,8 @@ class UndeleteForm { Xml::submitButton( wfMsg( 'undeletebtn' ), array( 'name' => 'restore', 'id' => 'mw-undelete-submit' ) ) . Xml::element( 'input', array( 'type' => 'reset', 'value' => wfMsg( 'undeletereset' ), 'id' => 'mw-undelete-reset' ) ) . " - - -   - " . - Xml::check( 'wpUnsuppress', $this->mUnsuppress, array('id' => 'mw-undelete-unsupress') ) . ' ' . - Xml::label( wfMsgHtml('revdelete-unsuppress'), 'mw-undelete-unsupress' ) . - " " . + $unsuppressBox . Xml::closeElement( 'table' ) . Xml::closeElement( 'fieldset' ); -- 2.20.1