X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnblock.php;h=931b179a36b64821a7ea0a957cc546eb2ef09542;hp=31c277a27d8dfd8c22ebf63e6b48de7faea234f5;hb=7b4eafda0d986180d20f37f2489b70e8eca00df4;hpb=d71db83e748fc4e68ba2105ff5501b986589cebe 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();