|
|
|
@ -241,9 +241,15 @@ class TicketManager |
|
|
|
|
$message = sprintf($plugin->get_lang('TicketAssignedMsg'), $info['complete_name'], $href, $ticket_id); |
|
|
|
|
$mailTitle = sprintf($plugin->get_lang('TicketAssignX'), $ticket_id); |
|
|
|
|
api_mail_html( |
|
|
|
|
$info['complete_name'], $info['mail'], $mailTitle, $message, null, // sender name |
|
|
|
|
$info['complete_name'], |
|
|
|
|
$info['mail'], |
|
|
|
|
$mailTitle, |
|
|
|
|
$message, |
|
|
|
|
null, // sender name |
|
|
|
|
null, // sender e-mail |
|
|
|
|
array('cc' => $sender['email']) // should be support e-mail (platform admin) here |
|
|
|
|
array( |
|
|
|
|
'cc' => $sender['email'] |
|
|
|
|
) // should be support e-mail (platform admin) here |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -415,7 +421,7 @@ class TicketManager |
|
|
|
|
'$user_id', |
|
|
|
|
'$now' |
|
|
|
|
)"; |
|
|
|
|
$result = Database::query($sql); |
|
|
|
|
Database::query($sql); |
|
|
|
|
return array( |
|
|
|
|
'path' => $path_message_attach . $safe_new_file_name, |
|
|
|
|
'filename' => $safe_file_name |
|
|
|
@ -433,9 +439,12 @@ class TicketManager |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|
public static function get_tickets_by_user_id( |
|
|
|
|
$from, $number_of_items, $column, $direction, $user_id = null |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
$from, |
|
|
|
|
$number_of_items, |
|
|
|
|
$column, |
|
|
|
|
$direction, |
|
|
|
|
$user_id = null |
|
|
|
|
) { |
|
|
|
|
global $plugin; |
|
|
|
|
$table_support_category = Database::get_main_table( |
|
|
|
|
TABLE_TICKET_CATEGORY |
|
|
|
@ -477,11 +486,13 @@ class TicketManager |
|
|
|
|
$table_support_status status, |
|
|
|
|
$table_main_user user, |
|
|
|
|
$table_support_messages msg |
|
|
|
|
WHERE cat.category_id = ticket.category_id |
|
|
|
|
WHERE |
|
|
|
|
cat.category_id = ticket.category_id |
|
|
|
|
AND ticket.priority_id = priority.priority_id |
|
|
|
|
AND ticket.status_id = status.status_id |
|
|
|
|
AND user.user_id = ticket.request_user |
|
|
|
|
AND ticket.ticket_id= msg.ticket_id AND message_id=1 "; |
|
|
|
|
AND ticket.ticket_id= msg.ticket_id |
|
|
|
|
AND message_id=1 "; |
|
|
|
|
if (!$isAdmin) { |
|
|
|
|
$sql .= " AND request_user = '$user_id' "; |
|
|
|
|
} |
|
|
|
@ -704,7 +715,8 @@ class TicketManager |
|
|
|
|
$dif = $now - $last_edit_date; |
|
|
|
|
|
|
|
|
|
if ($dif > 172800 && $row['priority_id'] == 'NRM' && $row['status_id'] != 'CLS') { |
|
|
|
|
$actions .= '<a href="myticket.php?ticket_id=' . $row['ticket_id'] . '&action=alert"><img src="' . $webPath . 'main/img/exclamation.png" border="0" /></a>'; |
|
|
|
|
$actions .= '<a href="myticket.php?ticket_id=' . $row['ticket_id'] . '&action=alert"> |
|
|
|
|
<img src="' . $webPath . 'main/img/exclamation.png" border="0" /></a>'; |
|
|
|
|
} |
|
|
|
|
if ($row['priority_id'] == 'HGH') { |
|
|
|
|
$actions .= '<img src="' . $webCodePath . 'img/admin_star.png" border="0" />'; |
|
|
|
@ -930,7 +942,8 @@ class TicketManager |
|
|
|
|
$table_support_category cat , |
|
|
|
|
$table_support_priority priority , |
|
|
|
|
$table_support_status status |
|
|
|
|
WHERE ticket.ticket_id = '$ticket_id' |
|
|
|
|
WHERE |
|
|
|
|
ticket.ticket_id = '$ticket_id' |
|
|
|
|
AND cat.category_id = ticket.category_id |
|
|
|
|
AND priority.priority_id = ticket.priority_id |
|
|
|
|
AND status.status_id = ticket.status_id "; |
|
|
|
|