From 9fc62839c68963fa9ad429f2eed1b804f77ce6a9 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Sun, 15 Jun 2014 10:17:52 -0400 Subject: [PATCH] Now the status is set to the IsClientClosed status ID instead of 3 --- change_status.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/change_status.php b/change_status.php index 8a1d3eed..ac1afe5f 100644 --- a/change_status.php +++ b/change_status.php @@ -53,9 +53,13 @@ $status = intval( hesk_GET('s', 0) ); $locked = 0; -$statusRow = hesk_dbFetchAssoc(hesk_dbQuery('SELECT `IsClosed` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE ID = '.$status)); -if ($statusRow['IsClosed']) // Closed + +if ($status == 3) // Closed { + //-- They want to close the ticket, so get the status that is the default for client-side closes + $statusRow = hesk_dbFetchAssoc(hesk_dbQuery('SELECT `ID` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsClosedByClient` = 1')); + + $status = $statusRow['ID']; $action = $hesklang['closed']; $revision = sprintf($hesklang['thist3'],hesk_date(),$hesklang['customer']);