mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Add hook subscriber for UserMergeAccountFields
Bug: 67757 Change-Id: Ibd77e7169c29f0757bc57fb1d0d13f765706d57e
This commit is contained in:
parent
8a63bc491c
commit
0a79fa054f
|
@ -639,6 +639,20 @@ class AbuseFilterHooks {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tables that Extension:UserMerge needs to update
|
||||
*
|
||||
* @param array $updateFields
|
||||
* @return bool
|
||||
*/
|
||||
public static function onUserMergeAccountFields( array &$updateFields ) {
|
||||
$updateFields[] = array( 'abuse_filter', 'af_user', 'af_user_text' );
|
||||
$updateFields[] = array( 'abuse_filter_log', 'afl_user', 'afl_user_text' );
|
||||
$updateFields[] = array( 'abuse_filter_history', 'afh_user', 'afh_user_text' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to add PHPUnit test cases.
|
||||
* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
|
||||
|
|
|
@ -89,6 +89,7 @@ $wgHooks['UploadVerifyFile'][] = 'AbuseFilterHooks::onUploadVerifyFile';
|
|||
$wgHooks['MakeGlobalVariablesScript'][] = 'AbuseFilterHooks::onMakeGlobalVariablesScript';
|
||||
$wgHooks['ArticleSaveComplete'][] = 'AbuseFilterHooks::onArticleSaveComplete';
|
||||
$wgHooks['APIEditBeforeSave'][] = 'AbuseFilterHooks::onAPIEditBeforeSave';
|
||||
$wgHooks['UserMergeAccountFields'][] = 'AbuseFilterHooks::onUserMergeAccountFields';
|
||||
$wgHooks['UnitTestsList'][] = 'AbuseFilterHooks::onUnitTestsList';
|
||||
|
||||
$wgAvailableRights[] = 'abusefilter-modify';
|
||||
|
|
Loading…
Reference in a new issue