From 2742bb8a7eac99c844d2c4632096fca831a4504e Mon Sep 17 00:00:00 2001 From: sparkyx Date: Wed, 10 Sep 2025 11:21:40 +0200 Subject: [PATCH] Fix bug : when user cannot create TAG there were no warning --- include/ajax/ajax_tag_detail.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/include/ajax/ajax_tag_detail.php b/include/ajax/ajax_tag_detail.php index 50023859b..70a39f375 100644 --- a/include/ajax/ajax_tag_detail.php +++ b/include/ajax/ajax_tag_detail.php @@ -12,10 +12,30 @@ $tag=new Tag($cn); $http=new HttpInput(); $data=$tag->get_data(); $data->t_id=$http->get("tag","number"); -if ($data->t_id == -1 && $g_user->check_action(TAGADD) == 0 ) return; -$data->load(); +if ($data->t_id == -1 && $g_user->check_action(TAGADD) == 0 ) { + header('Content-type: text/xml; charset=UTF-8'); + $html=escape_xml(sprintf( +'%s +

+%s +

+%s +', HtmlInput::title_box(_("Etiquette"), "tag_div","close","","y") + ,_("Désolé, vous n'êtes pas autorisé à créer des étiquettes") + , HtmlInput::button_close("tag_div") + )); + + echo << + + +$html + +EOF; + return; +} echo HtmlInput::title_box(_("Etiquette"), "tag_div","close","","y"); - +$data->load(); ?>