diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php index cf9d1a84..a677176b 100644 --- a/admin/admin_ticket.php +++ b/admin/admin_ticket.php @@ -677,9 +677,9 @@ if($ticket['email'] != '') { $recentTicketsWithStatuses = array(); foreach ($recentTickets as $recentTicket) { $newRecentTicket = $recentTicket; - $thisTicketStatusRS = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . intval($recentTicket['status'])); + $thisTicketStatusRS = hesk_dbQuery("SELECT `ID`, `TextColor` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . intval($recentTicket['status'])); $theStatusRow = hesk_dbFetchAssoc($thisTicketStatusRS); - $newRecentTicket['statusText'] = $hesklang[$theStatusRow['Key']]; + $newRecentTicket['statusText'] = mfh_getDisplayTextForStatusId($theStatusRow['ID']); $newRecentTicket['statusColor'] = $theStatusRow['TextColor']; array_push($recentTicketsWithStatuses, $newRecentTicket); } @@ -975,11 +975,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); fetch_assoc()) + while ($statusRow = hesk_dbFetchAssoc($statusRs)) { if ($statusRow['IsStaffReopenedStatus'] == 1) { @@ -1079,11 +1079,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); echo '

'.$hesklang['status'].'

'; $status_options = array(); - $results = hesk_dbQuery("SELECT `ID`, `Key` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses`"); - while ($row = $results->fetch_assoc()) + $results = hesk_dbQuery("SELECT `ID`FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses`"); + while ($row = hesk_dbFetchAssoc($results)) { $selected = $ticket['status'] == $row['ID'] ? 'selected' : ''; - $status_options[$row['ID']] = ''; + $status_options[$row['ID']] = ''; } echo ' @@ -2033,7 +2033,7 @@ function hesk_printReplyForm() {
  • '; }