diff --git a/admin/admin_reply_ticket.php b/admin/admin_reply_ticket.php
index 7b87cead..b8e0f8eb 100644
--- a/admin/admin_reply_ticket.php
+++ b/admin/admin_reply_ticket.php
@@ -186,7 +186,7 @@ else
/* Update the original ticket */
$defaultStatusReplyStatus = hesk_dbFetchAssoc(hesk_dbQuery("SELECT `ID`, `IsClosed` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsDefaultStaffReplyStatus` = 1 LIMIT 1"));
-$staffClosedCheckboxStatus = hesk_dbFetchAssoc(hesk_dbQuery("SELECT `ID`, `IsClosed` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsStaffClosedCheckbox` = 1 LIMIT 1"));
+$staffClosedCheckboxStatus = hesk_dbFetchAssoc(hesk_dbQuery("SELECT `ID`, `IsClosed` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsStaffClosedOption` = 1 LIMIT 1"));
$lockedTicketStatus = hesk_dbFetchAssoc(hesk_dbQuery("SELECT `ID` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `LockedTicketStatus` = 1 LIMIT 1"));
$new_status = empty($_POST['close']) ? $defaultStatusReplyStatus['ID'] : $staffClosedCheckboxStatus['ID'];
diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php
index 8bbd8395..33dee701 100644
--- a/admin/admin_ticket.php
+++ b/admin/admin_ticket.php
@@ -1242,7 +1242,13 @@ function hesk_printReplyForm() {
echo '
';
}
}
- if ($ticket['status'] != 3)
+
+ $statusSql = 'SELECT `ID` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsStaffClosedOption` = 1';
+ $statusRow = hesk_dbQuery($statusSql)->fetch_assoc();
+ $staffClosedOptionStatus = array();
+ $staffClosedOptionStatus['ID'] = $statusRow['ID'];
+
+ if ($ticket['status'] != $staffClosedOptionStatus['ID'])
{
echo '
';
}