From 400d6e7684d1b28e5ae977c434632f1eac07adfa Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 1 Aug 2024 15:40:18 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20per=20evitare=20la=20creazione=20di=20un?= =?UTF-8?q?=20tag=20gi=C3=A0=20esistente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/tags/actions.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/tags/actions.php b/modules/tags/actions.php index 77d142b1b..a67937f5b 100644 --- a/modules/tags/actions.php +++ b/modules/tags/actions.php @@ -50,14 +50,11 @@ switch (post('op')) { ]); $id_record = $dbo->lastInsertedID(); - flash()->info(tr('Nuovo tag aggiunto!')); - } + if (isAjaxRequest()) { + echo json_encode(['id' => $id_record, 'text' => $nome]); + } - if (isAjaxRequest()) { - echo json_encode([ - 'id' => $id_record, - 'text' => $nome, - ]); + flash()->info(tr('Nuovo tag aggiunto!')); } break;