[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/04: Ajax call check_vatnumber must no bloc
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 02/04: Ajax call check_vatnumber must no block |
Date: |
Sat, 10 Aug 2024 05:15:12 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit ec8aa1d1e0cb64b27d0a58e1ebb30bcd342a088d
Author: Dany wm <danydb@noalyss.eu>
AuthorDate: Fri Jul 19 10:44:45 2024 +0200
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 );