Add hook subscriber for UserMergeAccountFields

Bug: 67757
Change-Id: Ibd77e7169c29f0757bc57fb1d0d13f765706d57e
This commit is contained in:
Kunal Mehta 2014-07-09 20:57:02 -07:00 committed by Reedy
parent 8a63bc491c
commit 0a79fa054f
2 changed files with 15 additions and 0 deletions

View file

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

View file

@ -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';