Don't indicate partial blocks on Special:ListUsers
authorThalia <thalia.e.chan@googlemail.com>
Fri, 23 Nov 2018 15:56:42 +0000 (15:56 +0000)
committerThalia <thalia.e.chan@googlemail.com>
Mon, 26 Nov 2018 15:34:15 +0000 (15:34 +0000)
Only indicate that a user is blocked if their block
is sitewide.

Bug:T208276
Change-Id: Iee032a126bf1a7a2aa1049196b79a9e269d83243

includes/specials/pagers/UsersPager.php

index bc24d26..fbf179d 100644 (file)
@@ -142,7 +142,8 @@ class UsersPager extends AlphabeticPager {
                                'user_id' => $this->creationSort ? 'user_id' : 'MAX(user_id)',
                                'edits' => 'MAX(user_editcount)',
                                'creation' => 'MIN(user_registration)',
-                               'ipb_deleted' => 'MAX(ipb_deleted)' // block/hide status
+                               'ipb_deleted' => 'MAX(ipb_deleted)', // block/hide status
+                               'ipb_sitewide' => 'MAX(ipb_sitewide)'
                        ],
                        'options' => $options,
                        'join_conds' => [
@@ -214,7 +215,8 @@ class UsersPager extends AlphabeticPager {
                        $created = $this->msg( 'usercreated', $d, $t, $row->user_name )->escaped();
                        $created = ' ' . $this->msg( 'parentheses' )->rawParams( $created )->escaped();
                }
-               $blocked = !is_null( $row->ipb_deleted ) ?
+
+               $blocked = !is_null( $row->ipb_deleted ) && $row->ipb_sitewide === '1' ?
                        ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() :
                        '';