summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Translate/utils/FuzzyBot.php
blob: e99921172097036614fe8883d7e4942f8a18f2e7 (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
<?php
/**
 * Do it all maintenance account
 *
 * @file
 * @author Niklas Laxström
 * @copyright Copyright © 2012-2013, Niklas Laxström
 * @license GPL-2.0+
 */

/**
 * FuzzyBot - the misunderstood workhorse.
 * @since 2012-01-02
 */
class FuzzyBot {
	public static function getUser() {
		$bot = User::newFromName( self::getName() );
		if ( $bot->isAnon() ) {
			$bot->addToDatabase();
		}

		return $bot;
	}

	public static function getName() {
		global $wgTranslateFuzzyBotName;

		return $wgTranslateFuzzyBotName;
	}
}