X-Git-Url: https://git.toastfreeware.priv.at/toast/cookiecaptcha.git/blobdiff_plain/a2a6e0afe1f6f05eef5c3185c1e742047591889e..ed40c74ceb427e73556e3631220898f0608054cb:/FancyCaptcha.php diff --git a/FancyCaptcha.php b/FancyCaptcha.php index f10cf09..c21afb8 100644 --- a/FancyCaptcha.php +++ b/FancyCaptcha.php @@ -51,7 +51,7 @@ class FancyCaptcha extends SimpleCaptcha { $answerHash = substr( md5( $digest ), 0, 16 ); if( $answerHash == $info['hash'] ) { - wfDebug( "FancyCaptcha: answer hash matches expected $hash\n" ); + wfDebug( "FancyCaptcha: answer hash matches expected {$info['hash']}\n" ); return true; } else { wfDebug( "FancyCaptcha: answer hashes to $answerHash, expected {$info['hash']}\n" ); @@ -62,7 +62,7 @@ class FancyCaptcha extends SimpleCaptcha { /** * Insert the captcha prompt into the edit form. */ - function formCallback( &$out ) { + function getForm() { $info = $this->pickImage(); if( !$info ) { die( "out of captcha images; this shouldn't happen" ); @@ -77,9 +77,7 @@ class FancyCaptcha extends SimpleCaptcha { $title = Title::makeTitle( NS_SPECIAL, 'Captcha/image' ); - $out->addWikiText( wfMsg( "captcha-short" ) ); - - $out->addHTML( "

" . + return "

" . wfElement( 'img', array( 'src' => $title->getLocalUrl( 'wpCaptchaId=' . urlencode( $index ) ), 'width' => $info['width'], @@ -96,7 +94,7 @@ class FancyCaptcha extends SimpleCaptcha { 'name' => 'wpCaptchaWord', 'id' => 'wpCaptchaWord', 'tabindex' => 1 ) ) . // tab in before the edit textarea - "

\n" ); + "

\n"; } /**