Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
UserMergeHandler
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 onUserMergeAccountFields
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\AbuseFilter\Hooks\Handlers;
4
5use MediaWiki\Extension\UserMerge\Hooks\AccountFieldsHook;
6
7class UserMergeHandler implements AccountFieldsHook {
8
9    /**
10     * Tables that Extension:UserMerge needs to update
11     *
12     * @param array[] &$updateFields
13     */
14    public function onUserMergeAccountFields( array &$updateFields ) {
15        $updateFields[] = [
16            'abuse_filter',
17            'batchKey' => 'af_id',
18            'actorId' => 'af_actor',
19            'actorStage' => SCHEMA_COMPAT_NEW,
20        ];
21        $updateFields[] = [
22            'abuse_filter_log',
23            'afl_user',
24            'afl_user_text',
25            'batchKey' => 'afl_id',
26        ];
27        $updateFields[] = [
28            'abuse_filter_history',
29            'batchKey' => 'afh_id',
30            'actorId' => 'afh_actor',
31            'actorStage' => SCHEMA_COMPAT_NEW,
32        ];
33    }
34
35}