dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialUnblock.php
diff --git
a/includes/specials/SpecialUnblock.php
b/includes/specials/SpecialUnblock.php
index
31c277a
..
931b179
100644
(file)
--- a/
includes/specials/SpecialUnblock.php
+++ b/
includes/specials/SpecialUnblock.php
@@
-22,6
+22,7
@@
*/
use MediaWiki\Block\DatabaseBlock;
*/
use MediaWiki\Block\DatabaseBlock;
+use MediaWiki\MediaWikiServices;
/**
* A special page for unblocking users
/**
* 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 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' ];
}
return [ 'unblock-hideuser' ];
}
@@
-249,7
+253,7
@@
class SpecialUnblock extends SpecialPage {
$logEntry->setComment( $data['Reason'] );
$logEntry->setPerformer( $performer );
if ( isset( $data['Tags'] ) ) {
$logEntry->setComment( $data['Reason'] );
$logEntry->setPerformer( $performer );
if ( isset( $data['Tags'] ) ) {
- $logEntry->
set
Tags( $data['Tags'] );
+ $logEntry->
add
Tags( $data['Tags'] );
}
$logEntry->setRelations( [ 'ipb_id' => $block->getId() ] );
$logId = $logEntry->insert();
}
$logEntry->setRelations( [ 'ipb_id' => $block->getId() ] );
$logId = $logEntry->insert();