X-Git-Url: https://git.toastfreeware.priv.at/toast/cookiecaptcha.git/blobdiff_plain/2df8abcefffc6cbf5c2f7e38aec90eb581d5967d..4a6c4e2bcffbc8e9f3e6b82d5107bbd63417630a:/MathCaptcha.class.php diff --git a/MathCaptcha.class.php b/MathCaptcha.class.php index 66567e0..9b9cde2 100644 --- a/MathCaptcha.class.php +++ b/MathCaptcha.class.php @@ -7,26 +7,26 @@ class MathCaptcha extends SimpleCaptcha { return (int)$answer == (int)$info['answer']; } - function addCaptchaAPI(&$resultArr) { + function addCaptchaAPI( &$resultArr ) { list( $sum, $answer ) = $this->pickSum(); - $index = $this->storeCaptcha( array('answer' => $answer ) ); + $index = $this->storeCaptcha( array( 'answer' => $answer ) ); $resultArr['captcha']['type'] = 'math'; $resultArr['captcha']['mime'] = 'text/tex'; $resultArr['captcha']['id'] = $index; $resultArr['captcha']['question'] = $sum; } - + /** 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' ) ) . ' |