X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FBlockListPager.php;h=718da6da0f2dedbf2ef7c79ad22c7f41b31b8da5;hb=7b4eafda0d986180d20f37f2489b70e8eca00df4;hp=d61a1beed9bf27c9bf3094ec51b3a3c15ad058f2;hpb=6bd6b9cb4958936d1b6e3e2a30cf64973aade72d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/pagers/BlockListPager.php b/includes/specials/pagers/BlockListPager.php index d61a1beed9..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 + * @suppress PhanTypeArraySuspicious */ function formatValue( $name, $value ) { static $msg = null; @@ -137,7 +137,11 @@ 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( SpecialPage::getTitleFor( 'Unblock' ), @@ -265,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', @@ -356,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; }