From 2e3328cc52b8fc71af8ca710e8e90a89bc8341e7 Mon Sep 17 00:00:00 2001 From: Dany wm Date: Fri, 19 Jul 2024 10:44:45 +0200 Subject: [PATCH] Ajax call check_vatnumber must no block --- html/ajax_misc.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/html/ajax_misc.php b/html/ajax_misc.php index e111760f4..0dbf4b460 100644 --- a/html/ajax_misc.php +++ b/html/ajax_misc.php @@ -36,13 +36,19 @@ * */ if ( ! defined('ALLOWED')) define ('ALLOWED',1); - require_once '../include/constant.php'; require_once NOALYSS_INCLUDE."/lib/ac_common.php"; global $http; $http=new HttpInput(); +try { + $op= $http->request("op"); + if ($op =='check_vatnumber') session_write_close(); + +} catch (\Exception $e) { + exit(); +} /* we ask a dg box for disconnecting */ if ($http->request('op',"string","") == 'disconnect') { @@ -60,24 +66,12 @@ if ( ! isset($_SESSION[SESSION_KEY."g_user"])) { mb_internal_encoding("UTF-8"); -$var = array( 'op'); -$cont = 0; -/* check if mandatory parameters are given */ -foreach ($var as $v) -{ - if (!isset($_REQUEST [$v])) - { - echo "$v is not set "; - $cont = 1; - } -} - // If not connected to a folder if ( ! isset($_REQUEST['gDossier'])) { $gDossier=0; } -if ($cont != 0) exit(); + extract($_REQUEST, EXTR_SKIP );