From 4504c53007da272d57f6a3d5c48b1166e01cd93c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Nov 2022 14:14:03 +0530 Subject: [PATCH 1/7] #22941 --- htdocs/core/actions_sendmails.inc.php | 8 ++++---- htdocs/core/class/html.formmail.class.php | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index f0ef66eb78b..dcdd6be9bad 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -34,7 +34,7 @@ * Add file in email form */ if (GETPOST('addfile', 'alpha')) { - $trackid = GETPOST('trackid', 'aZ09'); + $trackid = GETPOST('track_id', 'aZ09'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -50,7 +50,7 @@ if (GETPOST('addfile', 'alpha')) { * Remove file in email form */ if (GETPOST('removedfile') && !GETPOST('removAll')) { - $trackid = GETPOST('trackid', 'aZ09'); + $trackid = GETPOST('track_id', 'aZ09'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -68,7 +68,7 @@ if (GETPOST('removedfile') && !GETPOST('removAll')) { * Remove all files in email form */ if (GETPOST('removAll', 'alpha')) { - $trackid = GETPOST('trackid', 'aZ09'); + $trackid = GETPOST('track_id', 'aZ09'); $listofpaths = array(); $listofnames = array(); @@ -105,7 +105,7 @@ if (GETPOST('removAll', 'alpha')) { */ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPOST('removAll') && !GETPOST('removedfile') && !GETPOST('cancel') && !GETPOST('modelselected')) { if (empty($trackid)) { - $trackid = GETPOST('trackid', 'aZ09'); + $trackid = GETPOST('track_id', 'aZ09'); } $subject = ''; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 74f0eadfdf2..2f90a277f36 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -196,6 +196,8 @@ class FormMail extends Form $this->withbodyreadonly = 0; $this->withdeliveryreceiptreadonly = 0; $this->withfckeditor = -1; // -1 = Auto + + $this->trackid = GETPOST('track_id', 'aZ09'); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps From 81b4f6dce1492837d0ce1caaea9e576341a2aa7d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 25 Nov 2022 16:34:55 +0530 Subject: [PATCH 2/7] #22947 --- htdocs/core/actions_sendmails.inc.php | 8 ++++---- htdocs/core/class/html.formmail.class.php | 2 -- htdocs/core/class/html.formticket.class.php | 6 ++++++ htdocs/ticket/class/ticket.class.php | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index dcdd6be9bad..f0ef66eb78b 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -34,7 +34,7 @@ * Add file in email form */ if (GETPOST('addfile', 'alpha')) { - $trackid = GETPOST('track_id', 'aZ09'); + $trackid = GETPOST('trackid', 'aZ09'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -50,7 +50,7 @@ if (GETPOST('addfile', 'alpha')) { * Remove file in email form */ if (GETPOST('removedfile') && !GETPOST('removAll')) { - $trackid = GETPOST('track_id', 'aZ09'); + $trackid = GETPOST('trackid', 'aZ09'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -68,7 +68,7 @@ if (GETPOST('removedfile') && !GETPOST('removAll')) { * Remove all files in email form */ if (GETPOST('removAll', 'alpha')) { - $trackid = GETPOST('track_id', 'aZ09'); + $trackid = GETPOST('trackid', 'aZ09'); $listofpaths = array(); $listofnames = array(); @@ -105,7 +105,7 @@ if (GETPOST('removAll', 'alpha')) { */ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPOST('removAll') && !GETPOST('removedfile') && !GETPOST('cancel') && !GETPOST('modelselected')) { if (empty($trackid)) { - $trackid = GETPOST('track_id', 'aZ09'); + $trackid = GETPOST('trackid', 'aZ09'); } $subject = ''; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2f90a277f36..74f0eadfdf2 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -196,8 +196,6 @@ class FormMail extends Form $this->withbodyreadonly = 0; $this->withdeliveryreceiptreadonly = 0; $this->withfckeditor = -1; // -1 = Auto - - $this->trackid = GETPOST('track_id', 'aZ09'); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index b5ba0b0208e..02ee41ebd4b 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1361,6 +1361,12 @@ class FormTicket print ''; print ''; print ''; + if (!empty($this->trackid)) { + print ''; + } else { + print ''; + $keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id; // track_id instead of trackid + } foreach ($this->param as $key => $value) { print ''; } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index eda4c06aa1e..42152a76a55 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2366,7 +2366,7 @@ class Ticket extends CommonObject $maxheightmini = 72; $formmail = new FormMail($this->db); - + $formmail->trackid = $this->trackid; $attachedfiles = $formmail->get_attached_files(); $filepath = $attachedfiles['paths']; @@ -2496,7 +2496,8 @@ class Ticket extends CommonObject $object->subject = GETPOST('subject', 'alphanohtml'); $object->message = GETPOST("message", "restricthtml"); $object->private = GETPOST("private_message", "alpha"); - + $object->trackid = GETPOST('trackid', 'aZ09'); + $send_email = GETPOST('send_email', 'int'); // Copy attached files (saved into $_SESSION) as linked files to ticket. Return array with final name used. From dec546eec0e7f2b2dadb02e81b99b316e217afca Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 25 Nov 2022 11:05:58 +0000 Subject: [PATCH 3/7] Fixing style errors. --- htdocs/ticket/class/ticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 42152a76a55..722d991662e 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2497,7 +2497,7 @@ class Ticket extends CommonObject $object->message = GETPOST("message", "restricthtml"); $object->private = GETPOST("private_message", "alpha"); $object->trackid = GETPOST('trackid', 'aZ09'); - + $send_email = GETPOST('send_email', 'int'); // Copy attached files (saved into $_SESSION) as linked files to ticket. Return array with final name used. From cd2fc2347dd76a65b08253374b259669edeb4c1a Mon Sep 17 00:00:00 2001 From: root Date: Sat, 26 Nov 2022 14:29:00 +0530 Subject: [PATCH 4/7] #23011 --- htdocs/accountancy/admin/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 02b95cfd043..1ba9ff540d0 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -315,7 +315,7 @@ if ($action == 'create') { // Account number print ''.$langs->trans("AccountNumber").''; - print ''; + print ''; // Label print ''.$langs->trans("Label").''; From 871789c49921a7a16b0ac32aaf03e9b7a64f4daf Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Dec 2022 13:20:34 +0530 Subject: [PATCH 5/7] Feature Request : #23062 --- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1c8c0b8698f..a68d81d2d92 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2234,7 +2234,7 @@ class EmailCollector extends CommonObject $tickettocreate->fk_user_create = $user->id; $tickettocreate->datec = $date; $tickettocreate->fk_project = $projectstatic->id; - $tickettocreate->notify_tiers_at_create = 0; + $tickettocreate->notify_tiers_at_create = empty($conf->global->TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION) ? 0 : 1; $tickettocreate->note_private = $descriptionfull; $tickettocreate->entity = $conf->entity; $tickettocreate->email_msgid = $msgid; From 12a3d7432e4d503c45e1c943ea09bfa50a91a61d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Dec 2022 13:32:52 +0530 Subject: [PATCH 6/7] Feature Request : #23062 --- htdocs/accountancy/admin/card.php | 2 +- htdocs/core/class/html.formticket.class.php | 6 ------ htdocs/ticket/class/ticket.class.php | 3 +-- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 1ba9ff540d0..02b95cfd043 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -315,7 +315,7 @@ if ($action == 'create') { // Account number print ''.$langs->trans("AccountNumber").''; - print ''; + print ''; // Label print ''.$langs->trans("Label").''; diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 02ee41ebd4b..b5ba0b0208e 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1361,12 +1361,6 @@ class FormTicket print ''; print ''; print ''; - if (!empty($this->trackid)) { - print ''; - } else { - print ''; - $keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id; // track_id instead of trackid - } foreach ($this->param as $key => $value) { print ''; } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 722d991662e..eda4c06aa1e 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2366,7 +2366,7 @@ class Ticket extends CommonObject $maxheightmini = 72; $formmail = new FormMail($this->db); - $formmail->trackid = $this->trackid; + $attachedfiles = $formmail->get_attached_files(); $filepath = $attachedfiles['paths']; @@ -2496,7 +2496,6 @@ class Ticket extends CommonObject $object->subject = GETPOST('subject', 'alphanohtml'); $object->message = GETPOST("message", "restricthtml"); $object->private = GETPOST("private_message", "alpha"); - $object->trackid = GETPOST('trackid', 'aZ09'); $send_email = GETPOST('send_email', 'int'); From be61b1cb47376e245bcb8b4226fec611b064abc4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Sep 2023 01:05:58 +0200 Subject: [PATCH 7/7] Update emailcollector.class.php --- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index a68d81d2d92..fd1a3370657 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2234,7 +2234,7 @@ class EmailCollector extends CommonObject $tickettocreate->fk_user_create = $user->id; $tickettocreate->datec = $date; $tickettocreate->fk_project = $projectstatic->id; - $tickettocreate->notify_tiers_at_create = empty($conf->global->TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION) ? 0 : 1; + $tickettocreate->notify_tiers_at_create = getDolGlobalInt('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION'); $tickettocreate->note_private = $descriptionfull; $tickettocreate->entity = $conf->entity; $tickettocreate->email_msgid = $msgid;