r51060 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51059‎ | r51060 | r51061 >
Date:13:46, 27 May 2009
Author:aaron
Status:ok
Tags:
Comment:
reverted r49742 per CR; also it doesn't handle subpages anyway
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -467,7 +467,7 @@
468468
469469 # Set *_deleted fields if requested
470470 if( $this->BlockHideName ) {
471 - self::suppressUserName( $this->BlockAddress, $userId, $reasonstr );
 471+ self::suppressUserName( $this->BlockAddress, $userId );
472472 }
473473
474474 # Only show watch link when this is no range block
@@ -497,20 +497,7 @@
498498 }
499499 }
500500
501 - public static function suppressUserName( $name, $userId, $reason = '' ) {
502 - $user = User::newFromName( $name, false );
503 - # Delete the user pages that exists
504 - $title = $user->getUserPage();
505 - if( ($id = $title->getArticleID(GAID_FOR_UPDATE)) ) {
506 - $article = new Article( $title );
507 - $article->doDeleteArticle( $reason, true /*suppress*/, $id );
508 - }
509 - # Delete the user talk pages that exists
510 - $title = $user->getTalkPage();
511 - if( $id = $title->getArticleID(GAID_FOR_UPDATE) ) {
512 - $article = new Article( $title );
513 - $article->doDeleteArticle( $reason, true /*suppress*/, $id );
514 - }
 501+ public static function suppressUserName( $name, $userId ) {
515502 $op = '|'; // bitwise OR
516503 return self::setUsernameBitfields( $name, $userId, $op );
517504 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r49742Change for bug 18383, suppress user/talk page on user suppressionaaron00:50, 23 April 2009

Status & tagging log