X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnblock.php;h=931b179a36b64821a7ea0a957cc546eb2ef09542;hb=25242105e8fd03c9900250bdf9ea91be9a286625;hp=31c277a27d8dfd8c22ebf63e6b48de7faea234f5;hpb=fab912b65c5363466beac64669573c366d74027c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php index 31c277a27d..931b179a36 100644 --- a/includes/specials/SpecialUnblock.php +++ b/includes/specials/SpecialUnblock.php @@ -22,6 +22,7 @@ */ use MediaWiki\Block\DatabaseBlock; +use MediaWiki\MediaWikiServices; /** * A special page for unblocking users @@ -208,7 +209,10 @@ class SpecialUnblock extends SpecialPage { # If the name was hidden and the blocking user cannot hide # names, then don't allow any block removals... - if ( !$performer->isAllowed( 'hideuser' ) && $block->getHideName() ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $performer, 'hideuser' ) && $block->getHideName() + ) { return [ 'unblock-hideuser' ]; } @@ -249,7 +253,7 @@ class SpecialUnblock extends SpecialPage { $logEntry->setComment( $data['Reason'] ); $logEntry->setPerformer( $performer ); if ( isset( $data['Tags'] ) ) { - $logEntry->setTags( $data['Tags'] ); + $logEntry->addTags( $data['Tags'] ); } $logEntry->setRelations( [ 'ipb_id' => $block->getId() ] ); $logId = $logEntry->insert();