X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryBlocks.php;h=f9da9a3108cde4427b4f7b1c3326008fb91743fc;hb=0e2241ad6c9fd1ac055ce1a829144a021dfdb79f;hp=5615f4621390fc068439f95d63aae4ffdbb9b8f9;hpb=aff7dacedcaae4ffba2106440960ba3b3f0c1d63;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 5615f46213..f9da9a3108 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -176,7 +176,7 @@ class ApiQueryBlocks extends ApiQueryBase { $this->addWhereIf( 'ipb_range_end > ipb_range_start', isset( $show['range'] ) ); } - if ( !$this->getUser()->isAllowed( 'hideuser' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'hideuser' ) ) { $this->addWhereFld( 'ipb_deleted', 0 ); } @@ -305,6 +305,8 @@ class ApiQueryBlocks extends ApiQueryBase { $id = $restriction->getBlockId(); switch ( $restriction->getType() ) { case 'page': + /** @var \MediaWiki\Block\Restriction\PageRestriction $restriction */ + '@phan-var \MediaWiki\Block\Restriction\PageRestriction $restriction'; $value = [ 'id' => $restriction->getValue() ]; if ( $restriction->getTitle() ) { self::addTitleInfo( $value, $restriction->getTitle() );