r99172 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99171‎ | r99172 | r99173 >
Date:00:38, 7 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Redact IP address when unblocking autoblocks
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUnblock.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUnblock.php
@@ -193,11 +193,17 @@
194194 RevisionDeleteUser::unsuppressUserName( $block->getTarget(), $id );
195195 }
196196
 197+ # Redact the name (IP address) for autoblocks
 198+ if ( $block->getType() == Block::TYPE_AUTO ) {
 199+ $page = Title::makeTitle( NS_USER, '#' . $block->getId() );
 200+ } else {
 201+ $page = $block->getTarget() instanceof User
 202+ ? $block->getTarget()->getUserpage()
 203+ : Title::makeTitle( NS_USER, $block->getTarget() );
 204+ }
 205+
197206 # Make log entry
198207 $log = new LogPage( 'block' );
199 - $page = $block->getTarget() instanceof User
200 - ? $block->getTarget()->getUserpage()
201 - : Title::makeTitle( NS_USER, $block->getTarget() );
202208 $log->addEntry( 'unblock', $page, $data['Reason'] );
203209
204210 return true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r99173MFT r99172 - Redact IP address when unblocking autoblocksaaron00:39, 7 October 2011
r100379REL1_18 MFT r99135, r99136, r99138, r99154, r99172, r99250, r99252, r99254, r...reedy21:22, 20 October 2011

Status & tagging log