mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Merge "Use extension.json and clear PHP entry point for MathCaptcha"
This commit is contained in:
commit
6609a684b3
|
@ -1,21 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Captcha class using simple sums and the math renderer
|
||||
* Not brilliant, but enough to dissuade casual spam bots
|
||||
*
|
||||
* @file
|
||||
* @ingroup Extensions
|
||||
* @author Rob Church <robchur@gmail.com>
|
||||
* @copyright © 2006 Rob Church
|
||||
* @licence GNU General Public Licence 2.0
|
||||
*/
|
||||
|
||||
if ( !defined( 'MEDIAWIKI' ) ) {
|
||||
exit;
|
||||
if ( function_exists( 'wfLoadExtension' ) ) {
|
||||
wfLoadExtension( 'ConfirmEdit/MathCaptcha' );
|
||||
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
||||
$wgMessagesDirs['MathCaptcha'] = __DIR__ . '/i18n';
|
||||
/* wfWarn(
|
||||
'Deprecated PHP entry point used for MathCaptcha extension. Please use wfLoadExtension instead, ' .
|
||||
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
||||
); */
|
||||
return;
|
||||
} else {
|
||||
die( 'This version of the MathCaptcha extension requires MediaWiki 1.25+' );
|
||||
}
|
||||
|
||||
require_once dirname( __DIR__ ) . '/ConfirmEdit.php';
|
||||
$wgCaptchaClass = 'MathCaptcha';
|
||||
|
||||
$wgAutoloadClasses['MathCaptcha'] = __DIR__ . '/MathCaptcha.class.php';
|
||||
|
|
9
MathCaptcha/extension.json
Normal file
9
MathCaptcha/extension.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "MathCaptcha",
|
||||
"AutoloadClasses": {
|
||||
"MathCaptcha": "MathCaptcha.class.php"
|
||||
},
|
||||
"config": {
|
||||
"CaptchaClass": "MathCaptcha"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue