"Tim Starling" changed the status of MediaWiki.r114672 to "ok"
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/114672

Old status:  new
New status: ok

Commit summary for MediaWiki.r114672:

(bug 35011) Use the correct user name & ID for crosswiki blocks.

Previously (r112563), using setId() ensured the correct ID, but caused a reload 
of the name from the DB the script is running on (metawiki), which was broken 
as it was inserting blocks into other wikis.

Instead, the User object is now always made from the name, which works since 
Block uses User::newFromName() and that still returns a User object regardless 
of whether a user with the name exists on the wiki (metawiki). Additionally, if 
a user ID is passed into the Block constructor, a special 'forcedTargetID' 
field is set which is used as the user ID for DB insertions/updates. This is 
horribly hacky and needs refactoring some day...

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to