mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Integrate with Renameuser
Register abuse_filter and abuse_filter_history tables. abuse_filter_log is more difficult (if possible). Bug: T27377 Bug: T206477 Change-Id: If8289101a08887519d5a90ef84700421b8ed2406
This commit is contained in:
parent
c5a1ab7899
commit
65708afcea
|
@ -6,6 +6,7 @@ $cfg['directory_list'] = array_merge(
|
|||
$cfg['directory_list'],
|
||||
[
|
||||
'../../extensions/CheckUser',
|
||||
'../../extensions/Renameuser',
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -13,6 +14,7 @@ $cfg['exclude_analysis_directory_list'] = array_merge(
|
|||
$cfg['exclude_analysis_directory_list'],
|
||||
[
|
||||
'../../extensions/CheckUser',
|
||||
'../../extensions/Renameuser',
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -284,6 +284,7 @@
|
|||
"UploadVerifyUpload": "AbuseFilterHooks::onUploadVerifyUpload",
|
||||
"UploadStashFile": "AbuseFilterHooks::onUploadStashFile",
|
||||
"PageSaveComplete": "AbuseFilterHooks::onPageSaveComplete",
|
||||
"RenameUserSQL": "AbuseFilterHooks::onRenameUserSQL",
|
||||
"UserMergeAccountFields": "AbuseFilterHooks::onUserMergeAccountFields",
|
||||
"ParserOutputStashForEdit": "AbuseFilterHooks::onParserOutputStashForEdit",
|
||||
"UnitTestsAfterDatabaseSetup": "AbuseFilterHooks::onUnitTestsAfterDatabaseSetup",
|
||||
|
|
|
@ -789,6 +789,26 @@ class AbuseFilterHooks {
|
|||
return $filterResult->isOK();
|
||||
}
|
||||
|
||||
/**
|
||||
* For integration with the Renameuser extension.
|
||||
*
|
||||
* @param RenameuserSQL $renameUserSQL
|
||||
*/
|
||||
public static function onRenameUserSQL( RenameuserSQL $renameUserSQL ) {
|
||||
$renameUserSQL->tablesJob['abuse_filter'] = [
|
||||
RenameuserSQL::NAME_COL => 'af_user_text',
|
||||
RenameuserSQL::UID_COL => 'af_user',
|
||||
RenameuserSQL::TIME_COL => 'af_timestamp',
|
||||
'uniqueKey' => 'af_id'
|
||||
];
|
||||
$renameUserSQL->tablesJob['abuse_filter_history'] = [
|
||||
RenameuserSQL::NAME_COL => 'afh_user_text',
|
||||
RenameuserSQL::UID_COL => 'afh_user',
|
||||
RenameuserSQL::TIME_COL => 'afh_timestamp',
|
||||
'uniqueKey' => 'afh_id'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Tables that Extension:UserMerge needs to update
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue