Fix Special:Userrights temp groups with no non-temp groups
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 21 Jun 2018 20:08:56 +0000 (16:08 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 21 Jun 2018 20:08:56 +0000 (16:08 -0400)
Special:Userrights was only checking the count of non-temporary groups
when deciding whether to show the list of temporary and non-temporary
groups. It needs to check both.

Bug: T197860
Change-Id: Ie8a9caad01f1a610584fb4a1272ad3800e9c8e6a

includes/specials/SpecialUserrights.php

index 22c6afe..0a35178 100644 (file)
@@ -658,7 +658,7 @@ class UserrightsPage extends SpecialPage {
                        )->escaped();
 
                $grouplist = '';
-               $count = count( $list );
+               $count = count( $list ) + count( $tempList );
                if ( $count > 0 ) {
                        $grouplist = $this->msg( 'userrights-groupsmember' )
                                ->numParams( $count )