Fixes #448 Set correct lock status, dont show open/close link to clients when ticket is locked
This commit is contained in:
parent
ef19dcb9b5
commit
e0e748c5d8
@ -95,11 +95,10 @@ if (empty($_GET['locked'])) {
|
||||
/* Update database */
|
||||
$statusSql = 'SELECT `ID` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `LockedTicketStatus` = 1';
|
||||
$statusRs = hesk_dbQuery($statusSql);
|
||||
$statusRow = hesk_dbFetchAssoc($statusSql);
|
||||
$statusRow = hesk_dbFetchAssoc($statusRs);
|
||||
$statusId = $statusRow['ID'];
|
||||
|
||||
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `status`='{$statusId}',`locked`='{$status}' $closedby_sql , `history`=CONCAT(`history`,'" . hesk_dbEscape($revision) . "') WHERE `trackid`='" . hesk_dbEscape($trackingID) . "' LIMIT 1");
|
||||
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `status`= {$statusId},`locked`='{$status}' $closedby_sql , `history`=CONCAT(`history`,'" . hesk_dbEscape($revision) . "') WHERE `trackid`='" . hesk_dbEscape($trackingID) . "' LIMIT 1");
|
||||
|
||||
/* Back to ticket page and show a success message */
|
||||
hesk_process_messages($tmp, 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . rand(10000, 99999), 'SUCCESS');
|
||||
?>
|
||||
hesk_process_messages($tmp, 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . rand(10000, 99999), 'SUCCESS');
|
||||
13
ticket.php
13
ticket.php
@ -275,11 +275,14 @@ if (!$show['show']) {
|
||||
$status = hesk_dbFetchAssoc($statusRS);
|
||||
$isClosable = $status['Closable'] == 'yes' || $status['Closable'] == 'conly';
|
||||
$random = rand(10000, 99999);
|
||||
if ($ticket['isClosed'] == true && $ticket['locked'] != 1 && $hesk_settings['custopen']) {
|
||||
echo '<a href="change_status.php?track=' . $trackingID . $hesk_settings['e_query'] . '&s=2&Refresh=' . $random . '&token=' . hesk_token_echo(0) . '" title="' . $hesklang['open_action'] . '">' . $hesklang['open_action'] . '</a>';
|
||||
} elseif ($hesk_settings['custclose'] && $isClosable) {
|
||||
echo '<a href="change_status.php?track=' . $trackingID . $hesk_settings['e_query'] . '&s=3&Refresh=' . $random . '&token=' . hesk_token_echo(0) . '" title="' . $hesklang['close_action'] . '">' . $hesklang['close_action'] . '</a>';
|
||||
} ?></p>
|
||||
if (!$ticket['locked']) {
|
||||
if ($ticket['isClosed'] == true && $hesk_settings['custopen']) {
|
||||
echo '<a href="change_status.php?track=' . $trackingID . $hesk_settings['e_query'] . '&s=2&Refresh=' . $random . '&token=' . hesk_token_echo(0) . '" title="' . $hesklang['open_action'] . '">' . $hesklang['open_action'] . '</a>';
|
||||
} elseif ($hesk_settings['custclose'] && $isClosable) {
|
||||
echo '<a href="change_status.php?track=' . $trackingID . $hesk_settings['e_query'] . '&s=3&Refresh=' . $random . '&token=' . hesk_token_echo(0) . '" title="' . $hesklang['close_action'] . '">' . $hesklang['close_action'] . '</a>';
|
||||
}
|
||||
}
|
||||
?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row medLowPriority">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user