Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/LMSManagers/LMSHelpdeskManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1203,9 +1203,10 @@ public function TicketAdd($ticket, $files = null)
// auto fix for misconfigured mail servers which mix character encodings in post headers
$headers = isset($ticket['headers']) ? mb_convert_encoding($ticket['headers'], 'UTF-8', 'UTF-8') : '';

$this->db->Execute('INSERT INTO rtmessages (ticketid, customerid, createtime,
$this->db->Execute('INSERT INTO rtmessages (ticketid, userid, customerid, createtime,
subject, body, mailfrom, phonefrom, messageid, replyto, headers, contenttype, extid)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($id,
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($id,
empty($ticket['requestor_userid']) ? Auth::GetCurrentUser() : $ticket['requestor_userid'],
empty($ticket['customerid']) ? null : $ticket['customerid'],
$createtime,
$ticket['subject'],
Expand All @@ -1220,9 +1221,10 @@ public function TicketAdd($ticket, $files = null)
));

if (isset($ticket['note']) && $ticket['note']) {
$this->db->Execute('INSERT INTO rtmessages (ticketid, customerid, createtime,
$this->db->Execute('INSERT INTO rtmessages (ticketid, userid, customerid, createtime,
subject, body, mailfrom, phonefrom, messageid, replyto, headers, type)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($id,
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($id,
empty($ticket['requestor_userid']) ? Auth::GetCurrentUser() : $ticket['requestor_userid'],
empty($ticket['customerid']) ? null : $ticket['customerid'],
$createtime,
$ticket['subject'],
Expand Down