From: Kunal Mehta Date: Tue, 16 Jul 2013 05:28:17 +0000 (-0700) Subject: Prevent Special:Contributions from indicating that an IP address is autoblocked X-Git-Tag: 1.31.0-rc.0~19185^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=dc2966bd05b;p=lhc%2Fweb%2Fwiklou.git Prevent Special:Contributions from indicating that an IP address is autoblocked 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 --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 7a3e7c80d1..614bd3ec41 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -298,7 +298,7 @@ class SpecialContributions extends SpecialPage { 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()