From 8897fdbdab5353812a2fbe4b849b9ca9d04361d9 Mon Sep 17 00:00:00 2001 From: cy_altern Date: Wed, 16 Mar 2022 19:45:18 +0100 Subject: [PATCH] ne pas planter le script de redirection si on envoie un form venant de gamutable dans une page autonom (pas en popin du gamutable) --- gamutable_fonctions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gamutable_fonctions.php b/gamutable_fonctions.php index 9cd6a20..bb7b12d 100644 --- a/gamutable_fonctions.php +++ b/gamutable_fonctions.php @@ -19,11 +19,15 @@ function gamutable_fermer_modalbox($id_objet = 9999999999){ id = "$id_objet"; id = parseInt(id); if (id > 0 && id < 9999999999) { - app.rechargerJson(id); + if (typeof app !== 'undefined') { + app.rechargerJson(id); + } $.modalboxclose(); } if (id === 9999999999) { - app.rechargerJson(); + if (typeof app !== 'undefined') { + app.rechargerJson(id); + } $.modalboxclose(); } delete id;