r48892 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48891‎ | r48892 | r48893 >
Date:18:53, 26 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Fix r48886: make sure title is normalized for query
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -501,6 +501,9 @@
502502 $dbw = wfGetDB( DB_MASTER );
503503 $delUser = Revision::DELETED_USER | Revision::DELETED_RESTRICTED;
504504 $delAction = LogPage::DELETED_ACTION | Revision::DELETED_RESTRICTED;
 505+ # Normalize user name
 506+ $userTitle = Title::makeTitleSafe( NS_USER, $name );
 507+ $userDbKey = $userTitle->getDBKey();
505508 # To suppress, we OR the current bitfields with Revision::DELETED_USER
506509 # to put a 1 in the username *_deleted bit. To unsuppress we AND the
507510 # current bitfields with the inverse of Revision::DELETED_USER. The
@@ -518,7 +521,7 @@
519522 $dbw->update( 'logging', array("log_deleted = log_deleted $op $delUser"),
520523 array('log_user' => $userId), __METHOD__ );
521524 $dbw->update( 'logging', array("log_deleted = log_deleted $op $delAction"),
522 - array('log_namespace' => NS_USER, 'log_title' => $name), __METHOD__ );
 525+ array('log_namespace' => NS_USER, 'log_title' => $userDbKey), __METHOD__ );
523526 # Hide name from RC
524527 $dbw->update( 'recentchanges', array("rc_deleted = rc_deleted $op $delUser"),
525528 array('rc_user_text' => $name), __METHOD__ );

Follow-up revisions

RevisionCommit summaryAuthorDate
r50162Backports for the hide user feature:...tstarling07:58, 4 May 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48886Hide log items with said user as the target as wellaaron16:46, 26 March 2009

Status & tagging log