From 8be17f91e79ae1b87f02697c34a97ef3e49dc3ce Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 9 Apr 2015 15:51:05 -0400 Subject: [PATCH] Only show "close ticket" if staff can close it --- admin/admin_ticket.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php index 6f587417..9e440aae 100644 --- a/admin/admin_ticket.php +++ b/admin/admin_ticket.php @@ -672,7 +672,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
'.$hesklang['asss'].']' : $hesklang['unas']); + ($can_assign_self ? $hesklang['unas'].' — '.$hesklang['asss'].'' : $hesklang['unas']); ?>
  • @@ -847,18 +847,19 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); } } - $isTicketClosedSql = 'SELECT `IsClosed` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `ID` = '.$ticket['status']; + $isTicketClosedSql = 'SELECT `IsClosed`, `Closable` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `ID` = '.$ticket['status']; $isTicketClosedRow = hesk_dbQuery($isTicketClosedSql)->fetch_assoc(); $isTicketClosed = $isTicketClosedRow['IsClosed']; + $isClosable = $isTicketClosedRow['Closable'] == 'yes' || $isTicketClosedRow['Closable'] == 'sonly'; echo '
    '; - if ($isTicketClosed == 0) // Ticket is still open + if ($isTicketClosed == 0 && $isClosable) // Ticket is still open { echo ' '.$hesklang['close_action'].''; } - else + elseif ($isTicketClosed == 1) { echo '