r107818 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107817‎ | r107818 | r107819 >
Date:11:51, 2 January 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
I forgot to svn add the file again. ahoy r107816
Modified paths:
  • /trunk/extensions/Translate/utils/FuzzyBot.php (added) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/FuzzyBot.php
@@ -0,0 +1,29 @@
 2+<?php
 3+/**
 4+ * Do it all maintenance account
 5+ *
 6+ * @file
 7+ * @author Niklas Laxström
 8+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2 or later
 9+ * @
 10+ */
 11+
 12+/**
 13+ * FuzzyBot - the misunderstood workhorse.
 14+ * @since 2012-01-02
 15+ */
 16+
 17+class FuzzyBot {
 18+ public static function getUser() {
 19+ $bot = User::newFromName( self::getName() );
 20+ if ( $bot->isAnon() ) {
 21+ $bot->addToDatabase();
 22+ }
 23+ return $bot;
 24+ }
 25+
 26+ public static function getName() {
 27+ global $wgTranslateFuzzyBotName;
 28+ return $wgTranslateFuzzyBotName;
 29+ }
 30+}
\ No newline at end of file
Property changes on: trunk/extensions/Translate/utils/FuzzyBot.php
___________________________________________________________________
Added: svn:eol-style
131 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r107977MFT r107043, r107816, r107818reedy00:46, 4 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107816Move FuzzyBot code into new class so that the user is created when needed...nikerabbit11:10, 2 January 2012

Status & tagging log