Popravki za test2

This commit is contained in:
Robert 2022-07-14 17:42:37 +02:00
parent ce3dd93ad4
commit e0a64503bd
3 changed files with 11 additions and 8 deletions

View File

@ -1173,7 +1173,7 @@ class ApiLogin
$gdprAgree = (isset($this->data['gdpr-agree'])) ? $this->data['gdpr-agree'] : '0'; $gdprAgree = (isset($this->data['gdpr-agree'])) ? $this->data['gdpr-agree'] : '0';
$ajaxKlic = (isset($this->data['ajax'])) ? $this->data['ajax'] : '0'; // Če izvajamo registracjo preko drupala, ker se pošlje post request preko ajaxa $ajaxKlic = (isset($this->data['ajax'])) ? $this->data['ajax'] : '0'; // Če izvajamo registracjo preko drupala, ker se pošlje post request preko ajaxa
$varnostno_polje = (isset($_POST['varnostno-polje'])) ? $_POST['varnostno-polje'] : false; $varnostno_polje = (isset($this->data['varnostno-polje'])) ? $this->data['varnostno-polje'] : false;
if (!empty($varnostno_polje)) { if (!empty($varnostno_polje)) {
if($this->method == 'AJAX'){ if($this->method == 'AJAX'){
@ -1190,7 +1190,7 @@ class ApiLogin
// Preverimo ReCaptcha // Preverimo ReCaptcha
if (!empty($secret_captcha)) { if (!empty($secret_captcha)) {
$recaptchaResponse = $_POST['g-recaptcha-response']; $recaptchaResponse = $this->data['g-recaptcha-response'];
$requestReCaptcha = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret_captcha."&response=".$recaptchaResponse); $requestReCaptcha = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret_captcha."&response=".$recaptchaResponse);
if (!strstr($requestReCaptcha, "true")) { if (!strstr($requestReCaptcha, "true")) {
@ -1307,11 +1307,11 @@ class ApiLogin
// Nastavimo jezik // Nastavimo jezik
$language = 1; $language = 1;
if(isset($_POST['language'])){ if(isset($this->data['language'])){
$language = $_POST['language']; $language = $this->data['language'];
} }
elseif(isset($_POST['jezik'])){ elseif(isset($this->data['jezik'])){
$language = ($_POST['jezik'] == 'en' ? 2 : 1); $language = ($this->data['jezik'] == 'en' ? 2 : 1);
} }
if(is_numeric($language)){ if(is_numeric($language)){

View File

@ -23,7 +23,10 @@ class ApiLoginController{
// Preberemo poslane podatke // Preberemo poslane podatke
$this->processCall(); $this->processCall();
//$this->processCallForm();
if(empty($this->data)) {
$this->processCallForm();
}
/*echo 'Params:'; /*echo 'Params:';

View File

@ -1119,7 +1119,7 @@ function isDebug(){
global $admin_type, $debug, $site_domain; global $admin_type, $debug, $site_domain;
if(isset($debug) && $debug > 0){ if(isset($debug) && $debug > 0){
if ($admin_type == 0 || in_array($site_domain, ['test.1ka.si', 'localhost', '1ka.test'])) { if ($admin_type == 0 || in_array($site_domain, ['test2.1ka.si', 'test.1ka.si', 'localhost', '1ka.test'])) {
return true; return true;
} }
} }