mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
MathCaptcha requires the texvc functions, which are now in the Math extension.
This commit is contained in:
parent
2894a23d5e
commit
4d62315053
|
@ -39,7 +39,11 @@ class MathCaptcha extends SimpleCaptcha {
|
|||
|
||||
/** Fetch the math */
|
||||
function fetchMath( $sum ) {
|
||||
$math = new MathRenderer( $sum );
|
||||
if( MWInit::classExists( 'MathRenderer' ) ){
|
||||
$math = new MathRenderer( $sum );
|
||||
} else {
|
||||
throw new MWException( 'MathCaptcha requires the Math extension for MediaWiki versions 1.18 and above.' );
|
||||
}
|
||||
$math->setOutputMode( MW_MATH_PNG );
|
||||
$html = $math->render();
|
||||
return preg_replace( '/alt=".*?"/', '', $html );
|
||||
|
|
Loading…
Reference in a new issue