Show UI edit link only as needed (bug 21263)
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 24 Oct 2009 21:06:44 +0000 (21:06 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 24 Oct 2009 21:06:44 +0000 (21:06 +0000)
includes/specials/SpecialRevisiondelete.php

index 985b8fa..3dcb6db 100644 (file)
@@ -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 );
        }