summaryrefslogtreecommitdiff
path: root/extensions/ConfirmEdit/MathCaptcha.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ConfirmEdit/MathCaptcha.class.php')
-rw-r--r--extensions/ConfirmEdit/MathCaptcha.class.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/extensions/ConfirmEdit/MathCaptcha.class.php b/extensions/ConfirmEdit/MathCaptcha.class.php
index 7874991f..fdb6d1ff 100644
--- a/extensions/ConfirmEdit/MathCaptcha.class.php
+++ b/extensions/ConfirmEdit/MathCaptcha.class.php
@@ -22,7 +22,7 @@ class MathCaptcha extends SimpleCaptcha {
$index = $this->storeCaptcha( array( 'answer' => $answer ) );
$form = '<table><tr><td>' . $this->fetchMath( $sum ) . '</td>';
- $form .= '<td>' . Html::input( 'wpCaptchaWord', false, false, array( 'tabindex' => '1', 'required' ) ) . '</td></tr></table>';
+ $form .= '<td>' . Html::input( 'wpCaptchaWord', false, false, array( 'tabindex' => '1', 'autocomplete' => 'off', 'required' ) ) . '</td></tr></table>';
$form .= Html::hidden( 'wpCaptchaId', $index );
return $form;
}
@@ -40,11 +40,10 @@ class MathCaptcha extends SimpleCaptcha {
/** Fetch the math */
function fetchMath( $sum ) {
if ( MWInit::classExists( 'MathRenderer' ) ) {
- $math = new MathRenderer( $sum );
+ $math = MathRenderer::getRenderer( $sum, array(), MW_MATH_PNG );
} 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 );
}