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 |
1 | 31 | + native |