summaryrefslogtreecommitdiff
blob: 89f38ac4ce17f5e0fd1c1934662680535b4fd861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

class UserMergeLogger implements IUserMergeLogger {

	/**
	 * Adds a merge log entry
	 *
	 * @todo Stop using this deprecated format
	 * @param User $performer
	 * @param User $oldUser
	 * @param User $newUser
	 */
	public function addMergeEntry( User $performer, User $oldUser, User $newUser ) {
		$log = new LogPage( 'usermerge' );
		$log->addEntry(
			'mergeuser',
			$performer->getUserPage(),
			'',
			[
				$oldUser->getName(), $oldUser->getId(),
				$newUser->getName(), $newUser->getId()
			],
			$performer
		);
	}

	/**
	 * Adds a user deletion log entry
	 *
	 * @todo Stop using this deprecated format
	 * @param User $perfomer
	 * @param User $oldUser
	 */
	public function addDeleteEntry( User $perfomer, User $oldUser ) {
		$log = new LogPage( 'usermerge' );
		$log->addEntry(
			'deleteuser',
			$perfomer->getUserPage(),
			'',
			[ $oldUser->getName(), $oldUser->getId() ],
			$perfomer
		);
	}
}