From 26faafc00a9b789db9f730c9bea5fd2cd3bbdf37 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Tue, 2 Sep 2025 22:09:06 +0200 Subject: [PATCH] Email and file : correct mimetype and fix comment in FollowUp --- include/class/follow_up.class.php | 2 +- include/lib/filetosend.class.php | 2 +- include/lib/sendmail_core.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php index e1767e12f..3edab1571 100644 --- a/include/class/follow_up.class.php +++ b/include/class/follow_up.class.php @@ -632,7 +632,7 @@ class Follow_Up if (noalyss_trim($this->ag_comment??"")!='' && Document_Option::can_add_comment($this->ag_id)) { $this->db->exec_sql("insert into action_gestion_comment (ag_id,tech_user,agc_comment,agc_comment_raw) values ($1,$2,$3,$4)" - , array($this->ag_id, $_SESSION[SESSION_KEY.'g_user'], strip_tags($this->ag_description),$this->ag_comment)); + , array($this->ag_id, $_SESSION[SESSION_KEY.'g_user'], strip_tags($this->ag_comment),$this->ag_comment)); } if (noalyss_trim($this->ag_description)!='' && Document_Option::can_add_comment($this->ag_id)) { diff --git a/include/lib/filetosend.class.php b/include/lib/filetosend.class.php index fc7479940..6fd9bb486 100644 --- a/include/lib/filetosend.class.php +++ b/include/lib/filetosend.class.php @@ -90,7 +90,7 @@ class FileToSend $this->type="application/zip"; break; default: - $this->type="application/octet"; + $this->type=" "; } } diff --git a/include/lib/sendmail_core.class.php b/include/lib/sendmail_core.class.php index 261f89ddb..3ff825a27 100644 --- a/include/lib/sendmail_core.class.php +++ b/include/lib/sendmail_core.class.php @@ -211,7 +211,7 @@ eof; $file = $this->afile[$i]; $file_size = filesize($file->full_name); - $mimetype= mime_content_type($file->full_name); + $mimetype=( $file->type=="")?mime_content_type($file->full_name):$file->type; $handle = fopen($file->full_name, "r"); if ( $handle == false ){ \record_log("SC159 ".var_export($file,true));