Last modified: 2008-04-05 16:44:38 UTC
If I rename an user that happen to be currently blocked, the blocklist doesn't
follow : there's still the block with the old name (a fanthom block, since it
does not correspond to an existing account anymore).
*aaaaa is blocked
*aaaaa is renamed to bbbbb
->"aaaaa" still appears unchanged in the block list
You ask, why the hell renaming a blocked account ? well because, it's because
they're containing insults (often against sysop, religion, ...)
This requires the following SQL statement:
UPDATE `$DBprefix_logging` SET `log_title` = '(new username)' WHERE `log_type` =
'block' AND `log_title`='(old username)'
I'll be committing a patch shortly...
Created attachment 3087 [details]
Logging table fix
I'm not sure how expensive this is, but here's my first patch. Enjoy! ;)
Created attachment 3088 [details]
Using Title::getDBkey(), as it should be
Created attachment 3089 [details]
Remove artifact caused by IDE
Would make log inaccurate. WONTFIX.
Reopening the bug per Brion on #wikimedia-tech
There's some general issues with logs and deleted/moved stuff. One way to fix
those problems is by modifying the logging table to include a foreign key with
the page id or the user id of a page or user, respectively. Then, a block can be
looked up via a log_user_id column, instead of the log_title column, which would
give out all the blocks on an account regardless of renames, and would not
require tampering with logs.
Related to this is keeping the revision_id of a deleted page, keeping the logs
of protected pages with the page, and other assorted Bag O'Stuff. More
suggestions include changing Special:Log to include more text boxes, so that
typing "User:Titoxd" in the page field does not become necessary anymore. That
could potentially be transparently to the user.
For future reference: related to this issue are bug 8296 and bug 2919.
The same problem has come up with the user rights log. For sysops who change
usernames, the user rights log stays on the old username.
This is causing us problems. (see
http://en.wikipedia.org/wiki/Wikipedia_talk:Changing_username for discussion).
We cannot tell from the logs whether a user has previously been renamed or not -
and their block log stays with the old name. This makes it hard for admins to
know how long to block someone for as if you are renamed you lose your history.
We also can't pick up renaming addicts.
*** Bug 12926 has been marked as a duplicate of this bug. ***
Done in r32816