r99173 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99172‎ | r99173 | r99174 >
Date:00:39, 7 October 2011
Author:aaron
Status:ok
Tags:
Comment:
MFT r99172 - Redact IP address when unblocking autoblocks
Modified paths:
  • /branches/wmf/1.18wmf1/includes/specials/SpecialUnblock.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/specials/SpecialUnblock.php
@@ -191,11 +191,17 @@
192192 RevisionDeleteUser::unsuppressUserName( $block->getTarget(), $id );
193193 }
194194
 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+
195204 # Make log entry
196205 $log = new LogPage( 'block' );
197 - $page = $block->getTarget() instanceof User
198 - ? $block->getTarget()->getUserpage()
199 - : Title::makeTitle( NS_USER, $block->getTarget() );
200206 $log->addEntry( 'unblock', $page, $data['Reason'] );
201207
202208 return true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99172Redact IP address when unblocking autoblocksaaron00:38, 7 October 2011

Status & tagging log