3 class CookieCaptcha extends SimpleCaptcha {
4 // Check whether the cookie is present
5 function keyMatch($answer, $info) {
6 global $wgCaptchaCookieName;
7 if (isset($_COOKIE[$wgCaptchaCookieName])) {
8 wfDebug( "CookieCaptcha: Found cookie\n" );
9 return parent::keyMatch($answer, $info);
11 wfDebug( "CookieCaptcha: Didn't find cookie...\n" );
18 global $wgCaptchaCookieName, $wgCaptchaCookieImage, $wgCaptchaCookieAlt, $wgCaptchaCookieStyle;
19 return parent::getForm() . "<p>" .
20 Html::element( 'img', array(
21 'src' => $wgCaptchaCookieImage,
22 'alt' => $wgCaptchaCookieAlt,
23 'style' => $wgCaptchaCookieStyle ) ) .