|
|
|
@ -296,10 +296,14 @@ class TicketManager |
|
|
|
* @return bool |
|
|
|
* @return bool |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function insert_message( |
|
|
|
public static function insert_message( |
|
|
|
$ticket_id, $subject, $content, $file_attachments, |
|
|
|
$ticket_id, |
|
|
|
$user_id, $status = 'NOL', $sendConfirmation = false |
|
|
|
$subject, |
|
|
|
) |
|
|
|
$content, |
|
|
|
{ |
|
|
|
$file_attachments, |
|
|
|
|
|
|
|
$user_id, |
|
|
|
|
|
|
|
$status = 'NOL', |
|
|
|
|
|
|
|
$sendConfirmation = false |
|
|
|
|
|
|
|
) { |
|
|
|
global $data_files, $plugin; |
|
|
|
global $data_files, $plugin; |
|
|
|
$ticket_id = intval($ticket_id); |
|
|
|
$ticket_id = intval($ticket_id); |
|
|
|
$subject = Database::escape_string($subject); |
|
|
|
$subject = Database::escape_string($subject); |
|
|
|
@ -369,6 +373,13 @@ class TicketManager |
|
|
|
$result = Database::query($sql_message_att_id); |
|
|
|
$result = Database::query($sql_message_att_id); |
|
|
|
$obj = Database::fetch_object($result); |
|
|
|
$obj = Database::fetch_object($result); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self::sendNotification( |
|
|
|
|
|
|
|
$ticket_id, |
|
|
|
|
|
|
|
$user_id, |
|
|
|
|
|
|
|
$plugin->get_lang('TicketUpdated'), |
|
|
|
|
|
|
|
$plugin->get_lang('TicketUpdated') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
$message_attch_id = $obj->total_attach + 1; |
|
|
|
$message_attch_id = $obj->total_attach + 1; |
|
|
|
if (is_array($file_attachments)) { |
|
|
|
if (is_array($file_attachments)) { |
|
|
|
foreach ($file_attachments as $file_attach) { |
|
|
|
foreach ($file_attachments as $file_attach) { |
|
|
|
|