Fix display of action table cells on Special:Tags
authorThis, that and the other <at.light@live.com.au>
Sun, 7 Aug 2016 04:56:19 +0000 (14:56 +1000)
committerThis, that and the other <at.light@live.com.au>
Sun, 7 Aug 2016 04:56:19 +0000 (14:56 +1000)
Users with the managechangetags right but without the deletechangetags
right saw a jagged table, with cells missing from the Actions column.

Also, users with the deletechangetags right but without the
managechangetags didn't see a column header for the Actions column.

Change-Id: I66198cfb181ba8616a98b16f84eaa843f0352f70

includes/specials/SpecialTags.php

index 2139949..3dac56b 100644 (file)
@@ -143,7 +143,7 @@ class SpecialTags extends SpecialPage {
                        Xml::tags( 'th', null, $this->msg( 'tags-source-header' )->parse() ) .
                        Xml::tags( 'th', null, $this->msg( 'tags-active-header' )->parse() ) .
                        Xml::tags( 'th', null, $this->msg( 'tags-hitcount-header' )->parse() ) .
-                       ( $userCanManage ?
+                       ( ( $userCanManage || $userCanDelete ) ?
                                Xml::tags( 'th', [ 'class' => 'unsortable' ],
                                        $this->msg( 'tags-actions-header' )->parse() ) :
                                '' )
@@ -261,7 +261,7 @@ class SpecialTags extends SpecialPage {
 
                }
 
-               if ( $actionLinks ) {
+               if ( $showDeleteActions || $showManageActions ) {
                        $newRow .= Xml::tags( 'td', null, $this->getLanguage()->pipeList( $actionLinks ) );
                }