mirror of
https://git.d3data.de/3rdParty/captcha-module.git
synced 2024-12-21 20:06:16 +01:00
Daniel Seifert
89d543156f
This form is often used for spam attacks. Requires new template blocks in the frontend theme.
45 lines
834 B
PHP
45 lines
834 B
PHP
<?php
|
|
/**
|
|
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
|
|
*/
|
|
|
|
class oeCaptchaNewsletter extends oeCaptchaNewsletter_parent
|
|
{
|
|
/**
|
|
* Class handling CAPTCHA image.
|
|
*
|
|
* @var object
|
|
*/
|
|
protected $captcha = null;
|
|
|
|
/**
|
|
* Composes and sends user written message, returns false if some parameters
|
|
* are missing.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function send()
|
|
{
|
|
if (!$this->getCaptcha()->passCaptcha()) {
|
|
return false;
|
|
}
|
|
|
|
return parent::send();
|
|
}
|
|
|
|
/**
|
|
* Template variable getter. Returns object of handling CAPTCHA image
|
|
*
|
|
* @return object
|
|
*/
|
|
public function getCaptcha()
|
|
{
|
|
if ($this->captcha === null) {
|
|
$this->captcha = oxNew('oeCaptcha');
|
|
}
|
|
|
|
return $this->captcha;
|
|
}
|
|
|
|
}
|