session_start
This commit is contained in:
parent
4a63488b51
commit
e7551ef018
@ -3,6 +3,8 @@ require_once dirname(__FILE__).'/../../config/config.inc.php';
|
|||||||
require_once dirname(__FILE__).'/../../init.php';
|
require_once dirname(__FILE__).'/../../init.php';
|
||||||
require_once dirname(__FILE__).'/Reason.php';
|
require_once dirname(__FILE__).'/Reason.php';
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
$controller->preProcess();
|
$controller->preProcess();
|
||||||
|
|
||||||
$langs = Language::getLanguages();
|
$langs = Language::getLanguages();
|
||||||
|
@ -3,6 +3,8 @@ class ContactController extends ContactControllerCore {
|
|||||||
|
|
||||||
public function preProcess()
|
public function preProcess()
|
||||||
{
|
{
|
||||||
|
session_start();
|
||||||
|
|
||||||
FrontController::preProcess();
|
FrontController::preProcess();
|
||||||
|
|
||||||
if (self::$cookie->isLogged())
|
if (self::$cookie->isLogged())
|
||||||
|
@ -21,7 +21,7 @@ class MathCaptcha
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generate ()
|
public function generate()
|
||||||
{
|
{
|
||||||
$this->addNum1 = rand(0, 10) * rand(1, 3);
|
$this->addNum1 = rand(0, 10) * rand(1, 3);
|
||||||
$this->addNum2 = 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 ) {
|
if ( $this->captchaImg === null ) {
|
||||||
throw new MathCaptchaException('Captcha image has not been generated');
|
throw new MathCaptchaException('Captcha image has not been generated');
|
||||||
@ -59,7 +59,7 @@ class MathCaptcha
|
|||||||
imagedestroy($this->captchaImg);
|
imagedestroy($this->captchaImg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function check ( $answer )
|
public function check( $answer )
|
||||||
{
|
{
|
||||||
// Check if math captcha has been generated
|
// Check if math captcha has been generated
|
||||||
if ( $this->answer === null ) {
|
if ( $this->answer === null ) {
|
||||||
@ -73,7 +73,6 @@ class MathCaptcha
|
|||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user