summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/src/SystemUsers/FuzzyBot.php')
-rw-r--r--MLEB/Translate/src/SystemUsers/FuzzyBot.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/MLEB/Translate/src/SystemUsers/FuzzyBot.php b/MLEB/Translate/src/SystemUsers/FuzzyBot.php
new file mode 100644
index 00000000..4e654ade
--- /dev/null
+++ b/MLEB/Translate/src/SystemUsers/FuzzyBot.php
@@ -0,0 +1,25 @@
+<?php
+declare( strict_types = 1 );
+
+namespace MediaWiki\Extensions\Translate\SystemUsers;
+
+use User;
+
+/**
+ * FuzzyBot - the misunderstood workhorse.
+ *
+ * @author Niklas Laxström
+ * @license GPL-2.0-or-later
+ * @since 2012-01-02
+ */
+class FuzzyBot {
+ public static function getUser(): User {
+ return User::newSystemUser( self::getName(), [ 'steal' => true ] );
+ }
+
+ public static function getName(): string {
+ global $wgTranslateFuzzyBotName;
+
+ return $wgTranslateFuzzyBotName;
+ }
+}