From ef2ec011f5e8aa504651f7430f22f8f24015f854 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Thu, 12 Sep 2024 21:34:28 +0200 Subject: [PATCH 1/3] Fix #30828 bad save of contract id in ticket card (#30916) Co-authored-by: Hystepik --- htdocs/core/class/html.formticket.class.php | 2 +- htdocs/ticket/card.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 0ac53cbde82..19068eba161 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -698,7 +698,7 @@ class FormTicket } } - if ($subelement != 'contract') { + if ($subelement != 'contract' && $subelement != 'contrat') { if (isModEnabled('contract') && !$this->ispublic) { $langs->load('contracts'); $formcontract = new FormContract($this->db); diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index e15d047d30f..a239c3f2bb6 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -249,7 +249,7 @@ if (empty($reshook)) { $object->fk_soc = GETPOSTINT('socid'); $fk_user_assign = GETPOSTINT('fk_user_assign'); $object->fk_project = GETPOSTINT('projectid'); - $object->fk_contract = GETPOSTINT('fk_contract'); + $object->fk_contract = GETPOSTISSET('contractid') ? GETPOSTINT('contractid') : GETPOSTINT('contratid'); if ($fk_user_assign > 0) { $object->fk_user_assign = $fk_user_assign; From 797ec9a7099821185e14716a19774c2232849f15 Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Thu, 12 Sep 2024 21:35:38 +0200 Subject: [PATCH 2/3] fix-seo-meta-tags-sanitization (#30924) Co-authored-by: Laurent Destailleur --- htdocs/core/lib/website2.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 2e2eb0371fb..8ed23b7d88b 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -279,13 +279,13 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage, $tplcontent .= '$tmp = ob_get_contents(); ob_end_clean();'."\n"; if (strpos($objectpage->content, '$__PAGE__TITLE__') !== false) { $tplcontent .= '$tmp = preg_replace("/.*?<\/title>/s", "<title>" . dol_escape_htmltag($__PAGE__TITLE__) . "", $tmp);'."\n"; - $tplcontent .= '$tmp = preg_replace("//s", "", $tmp);'; + $tplcontent .= '$tmp = preg_replace("//s", "", $tmp);'; } if (strpos($objectpage->content, '$__PAGE__KEYWORDS__') !== false) { - $tplcontent .= '$tmp = preg_replace("//s", "", $tmp);'; + $tplcontent .= '$tmp = preg_replace("//s", "", $tmp);'; } if (strpos($objectpage->content, '$__PAGE__DESC__') !== false) { - $tplcontent .= '$tmp = preg_replace("//s", "", $tmp);'; + $tplcontent .= '$tmp = preg_replace("//s", "", $tmp);'; } $tplcontent .= 'dolWebsiteOutput($tmp, "html", '.$objectpage->id.'); dolWebsiteIncrementCounter('.$object->id.', "'.$objectpage->type_container.'", '.$objectpage->id.');'."\n"; $tplcontent .= "// END PHP ?>\n"; From 5dd98765f2745165f3bacd5d836533868fc341ee Mon Sep 17 00:00:00 2001 From: Quentin-Seekness <72733832+Quentin-Seekness@users.noreply.github.com> Date: Thu, 12 Sep 2024 21:36:13 +0200 Subject: [PATCH 3/3] Use NDF_CC_EMAILS on ndf approval (#30937) --- htdocs/expensereport/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 105df5bf34a..535c84e216f 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -683,7 +683,7 @@ if (empty($reshook)) { } */ - $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, '', '', 0, -1); + $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, $emailCC, '', 0, -1); if ($mailfile) { // SEND