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;