User talk:Werdna
Contents
| Thread title | Replies | Last modified |
|---|---|---|
| AbuseFilter questions | 0 | 17:31, 28 March 2012 |
| Yet Another LiquidThreads Request | 1 | 01:41, 19 March 2012 |
| global AbuseFilter? | 0 | 07:01, 19 February 2012 |
| can you explain what this extension does? | 3 | 18:38, 20 July 2011 |
| AbuseFilter and moved text | 0 | 13:29, 16 May 2011 |
| LiquidThreads for Czech Wikipedia | 3 | 05:25, 20 August 2010 |
| AbuseFilter blocks edit when two warnings trigger | 1 | 21:45, 28 June 2010 |
| AbuseFilter actions | 3 | 00:13, 26 June 2010 |
| Signing up as a GSoC mentor | 0 | 18:18, 1 April 2010 |
| SocialProfile, RenameUser and RenameUserSQL hook | 2 | 19:40, 11 February 2010 |
| Just testing... | 1 | 00:32, 16 December 2009 |
| Testing again this time with firebug open | 0 | 09:21, 8 November 2009 |
| I WANTS POST | 0 | 09:21, 8 November 2009 |
| LiquidThreads is awesome | 2 | 04:41, 14 February 2011 |
Hello. I've got two questions I couldn't find the answers to.
- Is there a log about abusefilter imports where it is possible to find out when and where the filter was imported from?
- If its possible to have one filter which does the same thing as two filters do, which is preferable computationally and for speed?
Thanks and regards.
Hello. I want to know if, by reaching community consensus and of course a bug report, there's a possibility to enable LQ in the Arabic Wikipedia, since there is no fixed date for the redesign, and the extension is already in use in the Hungarian Wikipedia but put on hold for the Chinese Wikipedia.
Further deployments of LiquidThreads are indefinitely on hold because we don't have the resources to support it.
Conceptually, is there scope to have a global abuse filter? XWiki we are seeing bots appearing and dropping accounts with one-time spam, and then move on. We can see it through a number of sites, it is not high intensity, but regularly there. At this moment, due to the nature of the bot and a simplicity to its account names we can minimise aspects where we see it, the problem is we won't see it all. Currently AbuseFilter does allow a means to identify accounts, though that is a wiki by wiki approach, so the obvious question is there the scope for global AbuseFilter, even in some limited format. Thanks.
can you explain what this extension does a little more on the page: http://www.mediawiki.org/wiki/Extension:DeleteQueue
Thanks.
Hi Werdna,
could you please have a look at w:hu:Speciális:Vandálszűrő/20? My purpose was to filter when somebody puts a NOEDITSECTION (or one of its Hungarian translations) on a page in namespaces 0 to 1 (this works well) OR moves a page that contains NOEDITSECTION into these namespaces. But this does not work. First I tried with new_wikitext, then corrected to old_wikitext, but none of them works. Perhaps a pure "wikitext" would be necessary when the text stays unchanged, but there isn't any.
Hi Andrew,
at the Czech Wikipedia we are thinking about enabling LT for selected pages. Is Czech translation ready or can I help somehow? How do I ask for LT to be enabled? Should I file a bug?
Yes, you should file a bug. I'm not sure what the deal is with translation, I'll have to ask somebody from translatewiki.
The translation is ready, but a bug in namespaces hinders the installation. Can you fix it or does the chunk of code you pasted in comment of that bug make that work with some special wiki-setting?
One more question. I have two filters defined:
- Filter 1 ("orange"): article_namespace == 0 & "orange" in lcase(added_lines)
- Filter 2 ("green"): article_namespace == 0 & "green" in lcase(added_lines)
Both are configured ONLY to warn and tag. If I make an edit that triggers either independently (for example, add a line with the word "green" in it), AbuseFilter behaves as I expect (warns, then when I click Save a second time, it tags it in the edit history).
However, if I add lines that would trigger both filters, only filter #1 warning displays, and prevents the edit altogether. For example, here is the attempted two-line edit:
* The grass is green * I love oranges
When I click Save, the filter 1 warning displays above the edit box, and the log shows:
- 15:12, June 25, 2010: Obliquemotion (Talk | contribs | block) triggered filter 1, performing the action "edit" on Sandbox 2. Actions taken: Warn; Filter description: orange (details) (examine)
- 15:12, June 25, 2010: Obliquemotion (Talk | contribs | block) triggered filter 2, performing the action "edit" on Sandbox 2. Actions taken: tag; Filter description: green (details) (examine)
Then, if I click Save again (to override), I get the filter 1 warning again, and the log shows:
- 15:12, June 25, 2010: Obliquemotion (Talk | contribs | block) triggered filter 1, performing the action "edit" on Sandbox 2. Actions taken: Warn; Filter description: orange (details) (examine)
- 15:12, June 25, 2010: Obliquemotion (Talk | contribs | block) triggered filter 2, performing the action "edit" on Sandbox 2. Actions taken: tag; Filter description: green (details) (examine)
- 15:12, June 25, 2010: Obliquemotion (Talk | contribs | block) triggered filter 1, performing the action "edit" on Sandbox 2. Actions taken: Warn; Filter description: orange (details) (examine)
- 15:12, June 25, 2010: Obliquemotion (Talk | contribs | block) triggered filter 2, performing the action "edit" on Sandbox 2. Actions taken: tag; Filter description: green (details) (examine)
It seems like each time I click Save AbuseFilter adds the same two log entries, but prevents the edit (even though I didn't enable the Prevent the user from performing the action in question checkbox on either filter.
- Can you please explain this behavior? Is it a bug, or have I misconfigured something?
- Do the filters run in the order of their filter IDs (e.g. filter #1 runs before #2), and if so, how do I resequence them?
BTW, I'm running the 1.15.x snapshot of the extension on a 1.15 MediaWiki server.
Thanks very much for your patience.
Hi Werdna,
I'm evaluating Extension:AbuseFilter for use on our internal wiki, and trying to learn how it all works. When configuring a filter, under Actions taken when matched, I see a Flag the edit in the abuse log checkbox, but it's disabled (greyed out) so I can't click on it to clear the checkbox, and I can't figure out how to enable it. Is there any way to enable this option so I can clear the checkbox and prevent posting a triggered event to the Abuse log?
Thanks for the great extension!
Hi there! I see your name on the list of possible mentors on Summer of Code 2010. Thanks! If you're still interested, be sure to also sign up at http://socghop.appspot.com/gsoc/mentor/request/google/gsoc2010/wikimedia . Official deadline for doing so is April 21 but we'll need you on the roster there beforehand in order for you to be part of the evaluation process. Thanks!
Hi Werdna,
I've been trying to make my SocialProfile extension support user renaming, which it does not currently. I decided to ask for your help because you added the useful RenameUserSQL hook to SpecialRenameuser_body.php in r55189.
Here's the patch I came up with:
Index: SocialProfile.php =================================================================== --- SocialProfile.php (revision 59581) +++ SocialProfile.php (working copy) @@ -216,4 +216,47 @@ $wgExtNewTables[] = array( 'user_system_messages', "$dir/UserSystemMessages/user_system_messages.sql" ); } return true; +} + +// For Renameuser extension +$wgHooks['RenameUserSQL'][] = 'efSystemGiftsOnUserRename'; +$wgHooks['RenameUserSQL'][] = 'efUserBoardOnUserRename'; +$wgHooks['RenameUserSQL'][] = 'efUserGiftsOnUserRename'; +$wgHooks['RenameUserSQL'][] = 'efUserRelationshipOnUserRename'; +$wgHooks['RenameUserSQL'][] = 'efUserStatsOnUserRename'; +$wgHooks['RenameUserSQL'][] = 'efUserSystemMessagesOnUserRename'; + +function efSystemGiftsOnUserRename( $renameUserSQL ) { + $renameUserSQL->tables['user_system_gift'] = array( 'sg_user_name', 'sg_user_id' ); + return true; +} + +function efUserBoardOnUserRename( $renameUserSQL ) { + $renameUserSQL->tables['user_board'] = array( 'ub_user_name_from', 'ub_user_id_from' ); + return true; +} + +function efUserGiftsOnUserRename( $renameUserSQL ) { + $renameUserSQL->tables['user_gift'] = array( 'ug_user_name_to', 'ug_user_id_to' ); + $renameUserSQL->tables['gift'] = array( 'gift_creator_user_name', 'gift_creator_user_id' ); + return true; +} + +function efUserRelationshipOnUserRename( $renameUserSQL ) { + // <fixme> This sucks and only updates half of the rows...wtf? + $renameUserSQL->tables['user_relationship'] = array( 'r_user_name_relation', 'r_user_id_relation' ); + $renameUserSQL->tables['user_relationship'] = array( 'r_user_name', 'r_user_id' ); + // </fixme> + $renameUserSQL->tables['user_relationship_request'] = array( 'ur_user_name_from', 'ur_user_id_from' ); + return true; +} + +function efUserStatsOnUserRename( $renameUserSQL ) { + $renameUserSQL->tables['user_stats'] = array( 'stats_user_name', 'stats_user_id' ); + return true; +} + +function efUserSystemMessagesOnUserRename( $renameUserSQL ) { + $renameUserSQL->tables['user_system_messages'] = array( 'um_user_name', 'um_user_id' ); + return true; } \ No newline at end of file
As noted in function efUserRelationshipOnUserRename it doesn't work like I'd want it to. All other functions do work as they should, however. Here's some example data (and the table structure of user_relationship table) from my local testing wiki:
CREATE TABLE IF NOT EXISTS `user_relationship` ( `r_id` int(11) NOT NULL AUTO_INCREMENT, `r_user_id` int(5) unsigned NOT NULL DEFAULT '0', `r_user_name` varchar(255) NOT NULL DEFAULT '', `r_user_id_relation` int(5) unsigned NOT NULL DEFAULT '0', `r_user_name_relation` varchar(255) NOT NULL DEFAULT '', `r_type` int(2) DEFAULT NULL, `r_date` datetime DEFAULT NULL, PRIMARY KEY (`r_id`), KEY `r_user_id` (`r_user_id`), KEY `r_user_id_relation` (`r_user_id_relation`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- This signifies that User:Bar (user ID #2) is a friend of User:Foo (user id #1) -- and the other way around INSERT INTO `user_relationship` (`r_id`, `r_user_id`, `r_user_name`, `r_user_id_relation`, `r_user_name_relation`, `r_type`, `r_date`) VALUES (1, 2, 'Bar', 1, 'Foo', 1, '2009-12-03 22:28:33'), (2, 1, 'Foo', 2, 'Bar', 1, '2009-12-03 22:28:33');
When User:Bar is renamed to User:Baz, only one of the above entries is changed from 'Bar' to 'Baz' (can't remember which one) instead of both entries being changed. Is there a way to fix this and if so, how would I fix it?
Thanks in advance for your help!
Hi, I'm sorry for the late reply — I've been on vacation since December 20 last year.
I've just taken a peek at my own code, and it looks like the format for the array is $sql->tables['tablename'] = array( name_field, id_field, index_field ).
name_field is the field to update, id_field is a field with a user_id, and index_field is some sort of index for splitting up the job into manageable chunks (this may be only for tablesJob, I don't know).
I'm not quite clear on where you're going wrong, though. Any chance you could intercept the queries being used to update the rows? This might help us get a better idea of what's really going on in that crazy old class.
I renamed User:Bar to User:Baz under my "Foo" account. My user profile still shows "Bar" as my friend instead of "Baz". Here are the related queries from MySQL's query log:
123 Connect root@localhost on
123 Init DB phasethree
123 Query SET /* DatabaseMysql::open Foo */ NAMES utf8
123 Query SET /* DatabaseMysql::open Foo */ sql_mode = ''
123 Query SELECT /* SqlBagOStuff::get Foo */ value,exptime FROM `objectcache` WHERE keyname = 'phasethree:messages:en' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:renameuser' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'magicWords' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:renameuser-summary' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'linkPrefixExtension' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:renameuserold' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:renameusernew' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:renameuserreason' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:renameusermove' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:renameusersubmit' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:blocklogpage' LIMIT 1
122 Query SELECT /* LCStore_DB::get Foo */ lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:double-redirect-fixer' LIMIT 1
122 Query SELECT /* User::idForName Foo */ user_id FROM `user` WHERE user_name = 'Bar' LIMIT 1
122 Query SELECT /* User::idForName Foo */ user_id FROM `user` WHERE user_name = 'Baz' LIMIT 1
122 Query SELECT /* User::edits Foo */ user_editcount FROM `user` WHERE user_id = '5' LIMIT 1
122 Query SELECT /* User::edits Foo */ user_editcount FROM `user` WHERE user_id = '5' LIMIT 1
122 Query SELECT /* SiteStats::doLoad Foo */ * FROM `site_stats` LIMIT 1
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user` SET user_name = 'Baz',user_touched = '20100207170600' WHERE user_name = 'Bar'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `ipblocks` SET ipb_address = 'Baz' WHERE ipb_user = '5' AND ipb_address = 'Bar'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `logging` SET log_title = 'Baz' WHERE log_type IN ('block','rights') AND log_namespace = '2' AND log_title = 'Bar'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `image` SET img_user_text = 'Baz' WHERE img_user_text = 'Bar' AND img_user = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `oldimage` SET oi_user_text = 'Baz' WHERE oi_user_text = 'Bar' AND oi_user = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `revision` SET rev_user_text = 'Baz' WHERE rev_user_text = 'Bar' AND rev_user = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `archive` SET ar_user_text = 'Baz' WHERE ar_user_text = 'Bar' AND ar_user = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `logging` SET log_user_text = 'Baz' WHERE log_user_text = 'Bar' AND log_user = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `recentchanges` SET rc_user_text = 'Baz' WHERE rc_user_text = 'Bar' AND rc_user = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user_system_gift` SET sg_user_name = 'Baz' WHERE sg_user_name = 'Bar' AND sg_user_id = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user_board` SET ub_user_name_from = 'Baz' WHERE ub_user_name_from = 'Bar' AND ub_user_id_from = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user_gift` SET ug_user_name_to = 'Baz' WHERE ug_user_name_to = 'Bar' AND ug_user_id_to = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `gift` SET gift_creator_user_name = 'Baz' WHERE gift_creator_user_name = 'Bar' AND gift_creator_user_id = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user_relationship` SET r_user_name = 'Baz' WHERE r_user_name = 'Bar' AND r_user_id = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user_relationship_request` SET ur_user_name_from = 'Baz' WHERE ur_user_name_from = 'Bar' AND ur_user_id_from = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user_stats` SET stats_user_name = 'Baz' WHERE stats_user_name = 'Bar' AND stats_user_id = '5'
122 Query UPDATE /* RenameuserSQL::rename Foo */ `user_system_messages` SET um_user_name = 'Baz' WHERE um_user_name = 'Bar' AND um_user_id = '5'
122 Query COMMIT