X-Git-Url: https://git.toastfreeware.priv.at/toast/cookiecaptcha.git/blobdiff_plain/3578c2650437356874afa4b624f91da198a97b2b..04872c6af8f0783f6cbf37e96bfc7b9074a4dd5b:/MathCaptcha.php diff --git a/MathCaptcha.php b/MathCaptcha.php index ac214cf..b3a7a43 100644 --- a/MathCaptcha.php +++ b/MathCaptcha.php @@ -10,49 +10,9 @@ * @licence GNU General Public Licence 2.0 */ -if( defined( 'MEDIAWIKI' ) ) { - - class MathCaptcha extends SimpleCaptcha { - - /** Validate a captcha response */ - function keyMatch( $req, $info ) { - return (int)$req->getVal( 'wpCaptchaAnswer' ) == (int)$info['answer']; - } - - /** Produce a nice little form */ - function getForm() { - list( $sum, $answer ) = $this->pickSum(); - $index = $this->storeCaptcha( array( 'answer' => $answer ) ); - - $form = '
' . $this->fetchMath( $sum ) . ' | '; - $form .= '' . wfInput( 'wpCaptchaAnswer', false, false, array( 'tabindex' => '1' ) ) . ' |