fix captcha

This commit is contained in:
Evgeny Gryaznov 2011-02-16 01:40:39 +01:00
parent f54466f4ca
commit bfbc90aa8f
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ require_once('libs/common.php');
require_once('libs/captcha.php'); require_once('libs/captcha.php');
$captchaCode = gen_captcha(); $captchaCode = gen_captcha();
$_SESSION["captcha"] = $captchaCode; $_SESSION["mibew_captcha"] = $captchaCode;
draw_captcha($captchaCode); draw_captcha($captchaCode);
exit; exit;

View File

@ -83,11 +83,11 @@ if( !$email ) {
if($settings["enablecaptcha"] == "1" && can_show_captcha()) { if($settings["enablecaptcha"] == "1" && can_show_captcha()) {
$captcha = getparam('captcha'); $captcha = getparam('captcha');
$original = isset($_SESSION['captcha']) ? $_SESSION['captcha'] : ""; $original = isset($_SESSION["mibew_captcha"]) ? $_SESSION["mibew_captcha"] : "";
if(empty($original) || empty($captcha) || $captcha != $original) { if(empty($original) || empty($captcha) || $captcha != $original) {
$errors[] = getlocal('errors.captcha'); $errors[] = getlocal('errors.captcha');
} }
unset($_SESSION['captcha']); unset($_SESSION['mibew_captcha']);
} }
if( count($errors) > 0 ) { if( count($errors) > 0 ) {