X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FBlockListPager.php;h=718da6da0f2dedbf2ef7c79ad22c7f41b31b8da5;hb=fa0f6f34972c0e0f4aac24a03b3efdfc45f256f6;hp=6faf22bbea5733df81b3c51cc0ad50dc0b0d97b0;hpb=95797de3d623d5a5f48cf82edf502a2296bdc257;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/pagers/BlockListPager.php b/includes/specials/pagers/BlockListPager.php index 6faf22bbea..718da6da0f 100644 --- a/includes/specials/pagers/BlockListPager.php +++ b/includes/specials/pagers/BlockListPager.php @@ -74,7 +74,7 @@ class BlockListPager extends TablePager { * @param string $name * @param string $value * @return string - * @suppress PhanTypeArraySuspiciousNullable,PhanTypeArraySuspicious + * @suppress PhanTypeArraySuspicious */ function formatValue( $name, $value ) { static $msg = null; @@ -137,7 +137,10 @@ class BlockListPager extends TablePager { $value, /* User preference timezone */true ) ); - if ( $this->getUser()->isAllowed( 'block' ) ) { + if ( MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $this->getUser(), 'block' ) + ) { $links = []; if ( $row->ipb_auto ) { $links[] = $linkRenderer->makeKnownLink( @@ -266,6 +269,7 @@ class BlockListPager extends TablePager { switch ( $restriction->getType() ) { case PageRestriction::TYPE: + '@phan-var PageRestriction $restriction'; if ( $restriction->getTitle() ) { $items[$restriction->getType()][] = Html::rawElement( 'li', @@ -357,7 +361,10 @@ class BlockListPager extends TablePager { $info['conds'][] = 'ipb_expiry > ' . $db->addQuotes( $db->timestamp() ); # Is the user allowed to see hidden blocks? - if ( !$this->getUser()->isAllowed( 'hideuser' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $this->getUser(), 'hideuser' ) + ) { $info['conds']['ipb_deleted'] = 0; }