Skip to content
Permalink
Browse files Browse the repository at this point in the history
Prevent Special:Contributions from indicating that an IP address is a…
…utoblocked

If an IP address was autoblocked in the userlinks, sysops would see
"change block" and "unblock", indicating that the IP is autoblocked.

Now Special:Contributions will only display "change block" if the user
is blocked and the block type is not Block::TYPE_AUTO. This is the same
check which is used above when deciding whether to display the
block log extract.

Bug: 46457
Change-Id: I43047059cb67527d5296322ac17fe798db917bec
  • Loading branch information
legoktm committed Jul 16, 2013
1 parent 17ee7be commit dc2966b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/specials/SpecialContributions.php
Expand Up @@ -298,7 +298,7 @@ public function getUserLinks( Title $userpage, Title $talkpage, User $target ) {

if ( ( $id !== null ) || ( $id === null && IP::isIPAddress( $username ) ) ) {
if ( $this->getUser()->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
if ( $target->isBlocked() ) {
if ( $target->isBlocked() && $target->getBlock()->getType() != Block::TYPE_AUTO ) {
$tools[] = Linker::linkKnown( # Change block link
SpecialPage::getTitleFor( 'Block', $username ),
$this->msg( 'change-blocklink' )->escaped()
Expand Down

0 comments on commit dc2966b

Please sign in to comment.