mediawiki-extensions-Confir.../Asirra.php
lalei 12361c5f31 Add a button to request a new fancy captcha
This adds HTML, CSS, and JS to FancyCaptcha output to refresh the image,
which requests it via a new fancycaptchareload API.
It also cleans up the Asirra class a little.

Bug: 14230
Change-Id: I4e476f32de199534c9798fc78e8490b3ef91dd45
2013-04-17 20:10:33 -04:00

43 lines
1.1 KiB
PHP

<?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',
),
);