mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Move onUserMergeAccountFields to its own file
Sharing a handler class with UserRenameHandler means that attempting to merge users fails due to a missing interface if AbuseFilter and MergeUser are installed but Renameuser is not installed. Change-Id: I1244ab1c446840ff2648248f943d7fc784b889a7
This commit is contained in:
parent
8780749798
commit
2c939e28a9
|
@ -329,7 +329,7 @@
|
|||
"UploadStashFile": "MediaWiki\\Extension\\AbuseFilter\\AbuseFilterHooks::onUploadStashFile",
|
||||
"PageSaveComplete": "PageSave",
|
||||
"RenameUserSQL": "UserRename",
|
||||
"UserMergeAccountFields": "MediaWiki\\Extension\\AbuseFilter\\Hooks\\Handlers\\UserRenameHandler::onUserMergeAccountFields",
|
||||
"UserMergeAccountFields": "MediaWiki\\Extension\\AbuseFilter\\Hooks\\Handlers\\UserMergeHandler::onUserMergeAccountFields",
|
||||
"BeforeCreateEchoEvent": "MediaWiki\\Extension\\AbuseFilter\\Hooks\\Handlers\\EchoHandler::onBeforeCreateEchoEvent",
|
||||
"ParserOutputStashForEdit": "MediaWiki\\Extension\\AbuseFilter\\AbuseFilterHooks::onParserOutputStashForEdit",
|
||||
"UnitTestsAfterDatabaseSetup": "Tests",
|
||||
|
|
19
includes/Hooks/Handlers/UserMergeHandler.php
Normal file
19
includes/Hooks/Handlers/UserMergeHandler.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace MediaWiki\Extension\AbuseFilter\Hooks\Handlers;
|
||||
|
||||
class UserMergeHandler {
|
||||
|
||||
/**
|
||||
* Tables that Extension:UserMerge needs to update
|
||||
* @todo Use new hook system once UserMerge is updated
|
||||
*
|
||||
* @param array &$updateFields
|
||||
*/
|
||||
public static function onUserMergeAccountFields( array &$updateFields ) {
|
||||
$updateFields[] = [ 'abuse_filter', 'af_user', 'af_user_text' ];
|
||||
$updateFields[] = [ 'abuse_filter_log', 'afl_user', 'afl_user_text' ];
|
||||
$updateFields[] = [ 'abuse_filter_history', 'afh_user', 'afh_user_text' ];
|
||||
}
|
||||
|
||||
}
|
|
@ -25,16 +25,4 @@ class UserRenameHandler implements RenameUserSQLHook {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Tables that Extension:UserMerge needs to update
|
||||
* @todo Use new hook system once UserMerge is updated
|
||||
*
|
||||
* @param array &$updateFields
|
||||
*/
|
||||
public static function onUserMergeAccountFields( array &$updateFields ) {
|
||||
$updateFields[] = [ 'abuse_filter', 'af_user', 'af_user_text' ];
|
||||
$updateFields[] = [ 'abuse_filter_log', 'afl_user', 'afl_user_text' ];
|
||||
$updateFields[] = [ 'abuse_filter_history', 'afh_user', 'afh_user_text' ];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue