Index: branches/wmf/1.18wmf1/includes/specials/SpecialUnblock.php |
— | — | @@ -191,11 +191,17 @@ |
192 | 192 | RevisionDeleteUser::unsuppressUserName( $block->getTarget(), $id ); |
193 | 193 | } |
194 | 194 | |
| 195 | + # Redact the name (IP address) for autoblocks |
| 196 | + if ( $block->getType() == Block::TYPE_AUTO ) { |
| 197 | + $page = Title::makeTitle( NS_USER, '#' . $block->getId() ); |
| 198 | + } else { |
| 199 | + $page = $block->getTarget() instanceof User |
| 200 | + ? $block->getTarget()->getUserpage() |
| 201 | + : Title::makeTitle( NS_USER, $block->getTarget() ); |
| 202 | + } |
| 203 | + |
195 | 204 | # Make log entry |
196 | 205 | $log = new LogPage( 'block' ); |
197 | | - $page = $block->getTarget() instanceof User |
198 | | - ? $block->getTarget()->getUserpage() |
199 | | - : Title::makeTitle( NS_USER, $block->getTarget() ); |
200 | 206 | $log->addEntry( 'unblock', $page, $data['Reason'] ); |
201 | 207 | |
202 | 208 | return true; |