Fix BlockList params for non-editing partial blocks
authorDayllan Maza <dmaza@wikimedia.org>
Wed, 16 Jan 2019 18:20:51 +0000 (13:20 -0500)
committerDayllan Maza <dmaza@wikimedia.org>
Wed, 16 Jan 2019 18:22:36 +0000 (13:22 -0500)
When multiple blocks are listed, if there is a partial block
with restrictions, any other partial block in the list will be
shown as an editing block even if it isn't.

Bug: T213952
Change-Id: Ieafb5f71c484d9f0551fa293f7c43e1a3a2e1f2a

includes/specials/pagers/BlockListPager.php

index a0b14d2..205ffbf 100644 (file)
@@ -199,7 +199,9 @@ class BlockListPager extends TablePager {
 
                                if ( !$row->ipb_sitewide && $this->restrictions ) {
                                        $list = $this->getRestrictionListHTML( $this->restrictions, $row );
-                                       $properties[] = htmlspecialchars( $msg['blocklist-editing'] ) . $list;
+                                       if ( $list ) {
+                                               $properties[] = htmlspecialchars( $msg['blocklist-editing'] ) . $list;
+                                       }
                                }
 
                                if ( $row->ipb_anon_only ) {