From 3fce1d476d7fef05b1ff8e4fd203f2ef47c7246d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 26 Mar 2009 18:53:06 +0000 Subject: [PATCH] Fix r48886: make sure title is normalized for query --- includes/specials/SpecialBlockip.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index 59eea5195c..bffe386604 100644 --- a/includes/specials/SpecialBlockip.php +++ b/includes/specials/SpecialBlockip.php @@ -501,6 +501,9 @@ class IPBlockForm { $dbw = wfGetDB( DB_MASTER ); $delUser = Revision::DELETED_USER | Revision::DELETED_RESTRICTED; $delAction = LogPage::DELETED_ACTION | Revision::DELETED_RESTRICTED; + # Normalize user name + $userTitle = Title::makeTitleSafe( NS_USER, $name ); + $userDbKey = $userTitle->getDBKey(); # To suppress, we OR the current bitfields with Revision::DELETED_USER # to put a 1 in the username *_deleted bit. To unsuppress we AND the # current bitfields with the inverse of Revision::DELETED_USER. The @@ -518,7 +521,7 @@ class IPBlockForm { $dbw->update( 'logging', array("log_deleted = log_deleted $op $delUser"), array('log_user' => $userId), __METHOD__ ); $dbw->update( 'logging', array("log_deleted = log_deleted $op $delAction"), - array('log_namespace' => NS_USER, 'log_title' => $name), __METHOD__ ); + array('log_namespace' => NS_USER, 'log_title' => $userDbKey), __METHOD__ ); # Hide name from RC $dbw->update( 'recentchanges', array("rc_deleted = rc_deleted $op $delUser"), array('rc_user_text' => $name), __METHOD__ ); -- 2.20.1