From: Aaron Schulz Date: Thu, 26 Mar 2009 18:53:06 +0000 (+0000) Subject: Fix r48886: make sure title is normalized for query X-Git-Tag: 1.31.0-rc.0~42335 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=3fce1d476d7fef05b1ff8e4fd203f2ef47c7246d;p=lhc%2Fweb%2Fwiklou.git Fix r48886: make sure title is normalized for query --- 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__ );