summaryrefslogtreecommitdiff
path: root/extensions/ConfirmEdit/Asirra.php
blob: 923b0b9e8ea29c2fc5b7ec1112e8f8de556b5cb4 (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
/**
 * Asirra CAPTCHA module for the ConfirmEdit MediaWiki extension.
 * @author Bachsau
 * @author Niklas Laxström
 *
 * Makes use of the Asirra (Animal Species Image Recognition for
 * Restricting Access) CAPTCHA service, developed by John Douceur, Jeremy
 * Elson and Jon Howell at Microsoft Research.
 *
 * Asirra uses a large set of images from http://petfinder.com.
 *
 * For more information about Asirra, see:
 * http://research.microsoft.com/en-us/um/redmond/projects/asirra/
 *
 * This MediaWiki code is released into the public domain, without any
 * warranty. YOU CAN DO WITH IT WHATEVER YOU LIKE!
 *
 * @file
 * @ingroup Extensions
 */

if ( !defined( 'MEDIAWIKI' ) ) {
	exit;
}

$dir = __DIR__;
require_once( $dir . '/ConfirmEdit.php' );

$wgCaptchaClass = 'Asirra';
$wgExtensionMessagesFiles['Asirra'] = $dir . '/Asirra.i18n.php';
$wgAutoloadClasses['Asirra'] = $dir . '/Asirra.class.php';

$wgResourceModules['ext.confirmEdit.asirra'] = array(
	'localBasePath' => $dir . '/resources',
	'remoteExtPath' => 'ConfirmEdit/resources',
	'scripts' => 'ext.confirmEdit.asirra.js',
	'messages' => array(
		'asirra-failed',
	),
);