From 7bbde7d9507769b91433d46bcbd78966b477d6f9 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Wed, 20 Mar 2024 09:01:51 +0100 Subject: [PATCH 1/2] replace br to new lines if ckeditor is not enabled on ticket --- htdocs/ticket/class/actions_ticket.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index d1ade28f68f..71459a557e9 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -213,6 +213,9 @@ class ActionsTicket include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $uselocalbrowser = true; $ckeditorenabledforticket = getDolGlobalString('FCKEDITOR_ENABLE_TICKET'); + if(!$ckeditorenabledforticket){ + $msg = dol_string_nohtmltag($msg,2); + } $doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $ckeditorenabledforticket, ROWS_9, '95%'); $doleditor->Create(); } else { From 755d1feae8c3e2073e5f0fd62db98dca88eabdff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Mar 2024 10:52:37 +0100 Subject: [PATCH 2/2] Update actions_ticket.class.php --- htdocs/ticket/class/actions_ticket.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 12594b946a5..cc7e302db74 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -216,8 +216,8 @@ class ActionsTicket extends CommonHookActions include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $uselocalbrowser = true; $ckeditorenabledforticket = getDolGlobalString('FCKEDITOR_ENABLE_TICKET'); - if(!$ckeditorenabledforticket){ - $msg = dol_string_nohtmltag($msg,2); + if (!$ckeditorenabledforticket) { + $msg = dol_string_nohtmltag($msg, 2); } $doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $ckeditorenabledforticket, ROWS_9, '95%'); $doleditor->Create();