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__).'/Reason.php';
|
||||
|
||||
session_start();
|
||||
|
||||
$controller->preProcess();
|
||||
|
||||
$langs = Language::getLanguages();
|
||||
|
@ -3,6 +3,8 @@ class ContactController extends ContactControllerCore {
|
||||
|
||||
public function preProcess()
|
||||
{
|
||||
session_start();
|
||||
|
||||
FrontController::preProcess();
|
||||
|
||||
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->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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user