diff --git a/modules/ant_support_form/support.php b/modules/ant_support_form/support.php index fa3b5dd7..e4d353a8 100644 --- a/modules/ant_support_form/support.php +++ b/modules/ant_support_form/support.php @@ -3,6 +3,8 @@ require_once dirname(__FILE__).'/../../config/config.inc.php'; require_once dirname(__FILE__).'/../../init.php'; require_once dirname(__FILE__).'/Reason.php'; +session_start(); + $controller->preProcess(); $langs = Language::getLanguages(); diff --git a/override/controllers/ContactController.php b/override/controllers/ContactController.php index f963ec77..153b7dc1 100755 --- a/override/controllers/ContactController.php +++ b/override/controllers/ContactController.php @@ -3,6 +3,8 @@ class ContactController extends ContactControllerCore { public function preProcess() { + session_start(); + FrontController::preProcess(); if (self::$cookie->isLogged()) diff --git a/tools/math-captcha/src/MathCaptcha/MathCaptcha.php b/tools/math-captcha/src/MathCaptcha/MathCaptcha.php index 5c26e102..bd73fbeb 100644 --- a/tools/math-captcha/src/MathCaptcha/MathCaptcha.php +++ b/tools/math-captcha/src/MathCaptcha/MathCaptcha.php @@ -21,7 +21,7 @@ class MathCaptcha } - public function generate () + public function generate() { $this->addNum1 = rand(0, 10) * rand(1, 3); $this->addNum2 = rand(0, 10) * rand(1, 3); @@ -46,7 +46,7 @@ class MathCaptcha } - public function output () + public function output() { if ( $this->captchaImg === null ) { throw new MathCaptchaException('Captcha image has not been generated'); @@ -59,7 +59,7 @@ class MathCaptcha imagedestroy($this->captchaImg); } - public function check ( $answer ) + public function check( $answer ) { // Check if math captcha has been generated if ( $this->answer === null ) { @@ -73,7 +73,6 @@ class MathCaptcha else { return false; } - } } \ No newline at end of file