$fields['Target']['type'] = 'hidden';
switch ( $type ) {
case Block::TYPE_IP:
- $fields['Name']['default'] = Linker::linkKnown(
+ $fields['Name']['default'] = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Contributions', $target->getName() ),
$target->getName()
);
$fields['Name']['raw'] = true;
break;
case Block::TYPE_USER:
- $fields['Name']['default'] = Linker::link(
+ $fields['Name']['default'] = $this->getLinkRenderer()->makeLink(
$target->getUserPage(),
$target->getName()
);
return [ [ 'ipb_cant_unblock', $target ] ];
}
- # bug 15810: blocked admins should have limited access here. This
+ # T17810: blocked admins should have limited access here. This
# won't allow sysops to remove autoblocks on themselves, but they
# should have ipblock-exempt anyway
$status = SpecialBlock::checkUnblockSelf( $target, $performer );
return [ 'unblock-hideuser' ];
}
+ $reason = [ 'hookaborted' ];
+ if ( !Hooks::run( 'UnblockUser', [ &$block, &$performer, &$reason ] ) ) {
+ return $reason;
+ }
+
# Delete block
if ( !$block->delete() ) {
return [ [ 'ipb_cant_unblock', htmlspecialchars( $block->getTarget() ) ] ];
}
+ Hooks::run( 'UnblockUserComplete', [ $block, $performer ] );
+
# Unset _deleted fields as needed
if ( $block->mHideName ) {
# Something is deeply FUBAR if this is not a User object, but who knows?