r84584 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84583‎ | r84584 | r84585 >
Date:23:22, 22 March 2011
Author:happy-melon
Status:deferred (Comments)
Tags:
Comment:
Fix for UserMerge revealed by Block rewrite. Basically UserMerge was updating the ipb_address field with the new name of the user, but not ipb_user with the new id; it was also not updating ipb_by and ipb_by_name. This was not previously a problem because the Block constructor looked at the row via the ipb_user field first and would never decide that the block was applicable; the new system looks at ipb_address first and associates the block with the new user. This fix is just to make sure that the other fields are correctly updated when a merge is performed; the user being merged into still acquires any blocks on the user being merged.
Modified paths:
  • /trunk/extensions/UserMerge/UserMerge_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UserMerge/UserMerge_body.php
@@ -213,7 +213,8 @@
214214 array('image','img_user_text'),
215215 array('oldimage','oi_user_text'),
216216 array('recentchanges','rc_user_text'),
217 - array('ipblocks','ipb_address')
 217+ array('ipblocks','ipb_address'),
 218+ array('ipblocks','ipb_by_name'),
218219 );
219220
220221 $idUpdateFields = array(
@@ -223,7 +224,9 @@
224225 array('image','img_user'),
225226 array('oldimage','oi_user'),
226227 array('recentchanges','rc_user'),
227 - array('logging','log_user')
 228+ array('logging','log_user'),
 229+ array('ipblocks', 'ipb_id'),
 230+ array('ipblocks', 'ipb_by'),
228231 );
229232
230233 $dbw = wfGetDB( DB_MASTER );

Follow-up revisions

RevisionCommit summaryAuthorDate
r84587Fix r84584.happy-melon23:44, 22 March 2011

Comments

#Comment by Krinkle (talk | contribs)   23:41, 22 March 2011

isn't it ipb_by_text instead of ipb_by_name ?

Status & tagging log