From a4598042dc0508bacc4964b55e30c9222b47a832 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 24 Oct 2009 21:06:44 +0000 Subject: [PATCH] Show UI edit link only as needed (bug 21263) --- includes/specials/SpecialRevisiondelete.php | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 985b8fa9db..3dcb6db4a5 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -404,19 +404,19 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { } else { $out = ''; } - // Show link to edit the dropdown reasons - if( $wgUser->isAllowed( 'editinterface' ) ) { - $title = Title::makeTitle( NS_MEDIAWIKI, 'revdelete-reason-dropdown' ); - $link = $wgUser->getSkin()->link( - $title, - wfMsgHtml( 'revdelete-edit-reasonlist' ), - array(), - array( 'action' => 'edit' ) - ); - $out .= Xml::tags( 'p', array( 'class' => 'mw-revdel-editreasons' ), $link ) . "\n"; - } if( $this->mIsAllowed ) { $out .= Xml::closeElement( 'form' ) . "\n"; + // Show link to edit the dropdown reasons + if( $wgUser->isAllowed( 'editinterface' ) ) { + $title = Title::makeTitle( NS_MEDIAWIKI, 'revdelete-reason-dropdown' ); + $link = $wgUser->getSkin()->link( + $title, + wfMsgHtml( 'revdelete-edit-reasonlist' ), + array(), + array( 'action' => 'edit' ) + ); + $out .= Xml::tags( 'p', array( 'class' => 'mw-revdel-editreasons' ), $link ) . "\n"; + } } $wgOut->addHTML( $out ); } -- 2.20.1