Merge "Integrate with Renameuser"

This commit is contained in:
jenkins-bot 2020-10-01 11:33:08 +00:00 committed by Gerrit Code Review
commit edb1c5289a
3 changed files with 23 additions and 0 deletions

View file

@ -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',
]
);

View file

@ -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",

View file

@ -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
*