From eaa31ed4a3c444350469c979919510b5f94b153b Mon Sep 17 00:00:00 2001 From: kkhelifa-opendsi Date: Mon, 28 Oct 2024 21:16:17 +0100 Subject: [PATCH 1/3] FIX: Fix bug select columns and acces to the public ticket list from the public ticket card (case when we have connected to another client before, the track id stocked in session overwrite the new track id from the public ticket card) (#31000) --- htdocs/public/ticket/list.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index a73e669e5d6ca..035e66d973178 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -69,10 +69,10 @@ unset($_SESSION['track_id_customer']); unset($_SESSION['email_customer']); } -if (isset($_SESSION['track_id_customer'])) { +if (empty($track_id) && isset($_SESSION['track_id_customer'])) { $track_id = $_SESSION['track_id_customer']; } -if (isset($_SESSION['email_customer'])) { +if (empty($email) && isset($_SESSION['email_customer'])) { $email = strtolower($_SESSION['email_customer']); } @@ -209,6 +209,7 @@ // Store current page url $url_page_current = dol_buildpath('/public/ticket/list.php', 1); + $contextpage = $url_page_current; // Do we click on purge search criteria ? if (GETPOST("button_removefilter_x")) { @@ -266,7 +267,7 @@ if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate') { - $enabled = abs(dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1, 1, 0)); + $enabled = abs((int) dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1, 1, 0)); $enabled = (($enabled == 0 || $enabled == 3) ? 0 : $enabled); $arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' => $enabled && $extrafields->attributes[$object->table_element]['perms'][$key]); } From a186e16568abb5117c8098633658bcd6f2f901ca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Oct 2024 15:32:54 +0100 Subject: [PATCH 2/3] Backport fix for mysql 8 export --- htdocs/core/class/utils.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index d0c91199c5509..d8fb319bda5fa 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -390,7 +390,7 @@ public function dumpDatabase($compression = 'none', $type = 'auto', $usedefault if ($compression == 'none') fclose($handle); if ($compression == 'gz') gzclose($handle); if ($compression == 'bz') bzclose($handle); - if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error + if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg) || preg_match('/^\/\*M?!999999/', $errormsg)) { // Start of file is ok, NOT an error $errormsg = ''; } else From 8b4dcb1194362baa455a9a5cf5f9ca7abff8c22e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Oct 2024 15:43:16 +0100 Subject: [PATCH 3/3] FIX email templates for expense report not visible --- 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 1b583102a5be4..37b5faf54fe68 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2858,7 +2858,7 @@ } // Presend form -$modelmail = 'expensereport'; +$modelmail = 'expensereport_send'; $defaulttopic = 'SendExpenseReportRef'; $diroutput = $conf->expensereport->dir_output; $trackid = 'exp'.$object->id;