summaryrefslogtreecommitdiff
blob: 6e050bfef2f73dee33b3af02b82248b5c20c7735 (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
<?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(),
			'',
			array(
				$oldUser->getName(), $oldUser->getId(),
				$newUser->getName(), $newUser->getId()
			)
		);
	}

	/**
	 * 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(),
			'',
			array( $oldUser->getName(), $oldUser->getId() )
		);
	}
}