Now the "mark ticket resolved"/"open ticket" links respect the DB
This commit is contained in:
parent
5f1e2e844d
commit
7465eb420a
@ -538,15 +538,32 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<td colspan="10" style="border-width: 0px; text-align: right">
|
||||
<?php
|
||||
$random=rand(10000,99999);
|
||||
if ($ticket['status'] != 3)
|
||||
|
||||
$statusSql = 'SELECT `ID`, `TicketViewContentKey`, `IsStaffClosedOption`, `IsStaffReopenedStatus` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsStaffClosedOption` = 1 OR `IsStaffReopenedStatus` = 1';
|
||||
$statusRs = hesk_dbQuery($statusSql);
|
||||
$staffClosedOptionStatus = array();
|
||||
$staffReopenedStatus = array();
|
||||
while ($statusRow = $statusRs->fetch_assoc())
|
||||
{
|
||||
if ($statusRow['IsStaffReopenedStatus'] == 1)
|
||||
{
|
||||
$staffReopenedStatus['ID'] = $statusRow['ID'];
|
||||
} else
|
||||
{
|
||||
$staffClosedOptionStatus['ID'] = $statusRow['ID'];
|
||||
$staffClosedOptionStatus['TicketViewContentKey'] = $statusRow['TicketViewContentKey'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($ticket['status'] != $staffClosedOptionStatus['ID'])
|
||||
{
|
||||
echo '<a
|
||||
href="change_status.php?track='.$trackingID.'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['close_action'].'</a>';
|
||||
href="change_status.php?track='.$trackingID.'&s='.$staffClosedOptionStatus['ID'].'&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['close_action'].'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a
|
||||
href="change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['open_action'].'</a>';
|
||||
href="change_status.php?track='.$trackingID.'&s='.$staffReopenedStatus['ID'].'&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['open_action'].'</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user