X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiTag.php;h=aff01830e063e155783a88fe27a9a363f0c01dee;hb=a5c7fd0db2d962834127ec2362d0dfe8ef6852d5;hp=82cf986b4e3f4987ae59057536cff640a149f39a;hpb=3d98b80a3901a4f843af38066f4f1538ec635976;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiTag.php b/includes/api/ApiTag.php index 82cf986b4e..aff01830e0 100644 --- a/includes/api/ApiTag.php +++ b/includes/api/ApiTag.php @@ -40,8 +40,10 @@ class ApiTag extends ApiBase { // make sure the user is allowed $this->checkUserRightsAny( 'changetags' ); - if ( $user->isBlocked() ) { - $this->dieBlocked( $user->getBlock() ); + // @TODO Use PermissionManager::isBlockedFrom() instead. + $block = $user->getBlock(); + if ( $block ) { + $this->dieBlocked( $block ); } // Check if user can add tags