Bugfix ticket system display and handling of recipients

This commit is contained in:
Xenomporio 2022-08-03 10:30:05 +02:00
parent 731f67a9b9
commit 93da199f12
2 changed files with 11 additions and 3 deletions

View File

@ -554,7 +554,7 @@ class TicketImportHelper
// Add all the recipients to the header table // Add all the recipients to the header table
if (count($message->getRecipients()) > 1) { if (count($message->getRecipients()) > 0) {
foreach ($message->getRecipients() as $recipient) { foreach ($message->getRecipients() as $recipient) {
$recipient_address = $this->db->real_escape_string($recipient->getEmail()); $recipient_address = $this->db->real_escape_string($recipient->getEmail());

View File

@ -562,7 +562,13 @@ class Ticket {
} }
$sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='to'"; $sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='to'";
$to .= ", ".$this->app->DB->Select($sql);
$to_additional = $this->app->DB->Select($sql);
if (!empty($to_additional)) {
$to .= ", ".$to_additional;
}
$sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='cc'"; $sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='cc'";
$cc = $this->app->DB->Select($sql); $cc = $this->app->DB->Select($sql);
} }
@ -620,8 +626,10 @@ class Ticket {
// Attachments // Attachments
$files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],""); $files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],"");
if ($cc != '') { if ($drafted_messages[0]['mail_cc'] != '') {
$cc = explode(',',$drafted_messages[0]['mail_cc']); $cc = explode(',',$drafted_messages[0]['mail_cc']);
} else {
$cc = null;
} }
if ( if (