mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-14 20:19:43 +01:00
fixes for recaptcha #21
This commit is contained in:
@@ -336,11 +336,11 @@ if(! function_exists('getReCaptchaInputHtml'))
|
|||||||
|
|
||||||
if($config['kj_recaptcha_invisible'] == 1)
|
if($config['kj_recaptcha_invisible'] == 1)
|
||||||
{
|
{
|
||||||
return '<div id="aarecaptcha" style="margin: 10px auto; text-align: center; max-width: 255px;"></div>';
|
return '<div id="aarecaptcha" style="margin: 10px 0; text-align: center; max-width: 255px;"></div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return '<div class="g-recaptcha" data-sitekey="' . $config['kj_recaptcha_sitekey'] . '" style="margin: 10px auto; text-align: center; max-width: 255px;"></div>';
|
return '<div class="g-recaptcha" data-sitekey="' . $config['kj_recaptcha_sitekey'] . '" style="margin: 10px 0; text-align: center; max-width: 255px;"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -415,10 +415,13 @@ if (!function_exists('isReCaptchaValid')) {
|
|||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if(!ip('g-recaptcha-response') || empty(p('g-recaptcha-response'))){
|
if(empty($config['kj_recaptcha_sitekey']) || empty($config['kj_recaptcha_secret'])){
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ip('g-recaptcha-response') || empty(p('g-recaptcha-response'))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$data = array(
|
$data = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user