diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php
index 15d18ba3..48532063 100644
--- a/admin/admin_ticket.php
+++ b/admin/admin_ticket.php
@@ -1287,18 +1287,53 @@ function hesk_getAdminButtons($category_id)
/* Print ticket button */
$options .= ' ' . $hesklang['printer_friendly'] . ' ';
- /* Delete ticket */
- if ($can_delete) {
- if ($reply) {
- $url = 'admin_ticket.php';
- $tmp = 'delete_post=' . $reply['id'];
- $txt = $hesklang['delt'];
+ /* Copy ticket button */
+ $strippedName = strip_tags($ticket['name']);
+ $strippedEmail = strip_tags($ticket['email']);
+ $linkText = 'new_ticket.php?name=' . $strippedName . '&email=' . $strippedEmail . '&catid=' . $category_id . '&priority=' . $ticket['priority'];
+ foreach ($hesk_settings['custom_fields'] as $k => $v) {
+ if ($v['use'] == 1) {
+
+ if ($v['type'] == 'checkbox') {
+ $value = str_replace('
', '-CHECKBOX-', $ticket[$k]);
+ } else {
+ $value = $ticket[$k];
+ }
+ $strippedCustomField = strip_tags($value);
+ $linkText .= '&c_' . $k . '=' . $strippedCustomField;
+ }
+ }
+ $options .= ' ' . $hesklang['copy_ticket'] . ' ';
+
+ /* Close/Reopen ticket link */
+ $random = rand(10000, 99999);
+
+ $statusSql = 'SELECT `ID`, `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 = hesk_dbFetchAssoc($statusRs)) {
+ if ($statusRow['IsStaffReopenedStatus'] == 1) {
+ $staffReopenedStatus['ID'] = $statusRow['ID'];
} else {
- $url = 'delete_tickets.php';
- $tmp = 'delete_ticket=1';
- $txt = $hesklang['dele'];
+ $staffClosedOptionStatus['ID'] = $statusRow['ID'];
}
- $options .= ' ' . $txt . ' ';
+ }
+
+ $isTicketClosedSql = 'SELECT `IsClosed`, `Closable` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `ID` = ' . $ticket['status'];
+ $isTicketClosedRs = hesk_dbQuery($isTicketClosedSql);
+ $isTicketClosedRow = hesk_dbFetchAssoc($isTicketClosedRs);
+ $isTicketClosed = $isTicketClosedRow['IsClosed'];
+ $isClosable = $isTicketClosedRow['Closable'] == 'yes' || $isTicketClosedRow['Closable'] == 'sonly';
+
+ $mgr = $isManager ? '&isManager=1' : '';
+ if ($isTicketClosed == 0 && $isClosable && $can_resolve) // Ticket is still open
+ {
+ $options .= '
+ ' . $hesklang['close_action'] . ' ';
+ } elseif ($isTicketClosed == 1) {
+ $options .= '
+ ' . $hesklang['open_action'] . ' ';
}
$dropdown = '
@@ -1421,37 +1456,6 @@ function hesk_getAdminButtons($category_id)
$dropdown .= '
';
}
- /* Close/Reopen ticket link */
- $random = rand(10000, 99999);
-
- $statusSql = 'SELECT `ID`, `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 = hesk_dbFetchAssoc($statusRs)) {
- if ($statusRow['IsStaffReopenedStatus'] == 1) {
- $staffReopenedStatus['ID'] = $statusRow['ID'];
- } else {
- $staffClosedOptionStatus['ID'] = $statusRow['ID'];
- }
- }
-
- $isTicketClosedSql = 'SELECT `IsClosed`, `Closable` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `ID` = ' . $ticket['status'];
- $isTicketClosedRs = hesk_dbQuery($isTicketClosedSql);
- $isTicketClosedRow = hesk_dbFetchAssoc($isTicketClosedRs);
- $isTicketClosed = $isTicketClosedRow['IsClosed'];
- $isClosable = $isTicketClosedRow['Closable'] == 'yes' || $isTicketClosedRow['Closable'] == 'sonly';
-
- $mgr = $isManager ? '&isManager=1' : '';
- if ($isTicketClosed == 0 && $isClosable && $can_resolve) // Ticket is still open
- {
- $dropdown .= '
- ' . $hesklang['close_action'] . '';
- } elseif ($isTicketClosed == 1) {
- $dropdown .= '
- ' . $hesklang['open_action'] . '';
- }
-
/* Lock ticket button */
if ($can_resolve) {
$template = ' %s';
@@ -1474,24 +1478,19 @@ function hesk_getAdminButtons($category_id)
$dropdown .= ' ' . $hesklang['import_kb'] . '';
}
- /* Create ticket for same contact button */
- $strippedName = strip_tags($ticket['name']);
- $strippedEmail = strip_tags($ticket['email']);
- $linkText = 'new_ticket.php?name=' . $strippedName . '&email=' . $strippedEmail . '&catid=' . $category_id . '&priority=' . $ticket['priority'];
- foreach ($hesk_settings['custom_fields'] as $k => $v) {
- if ($v['use'] == 1) {
-
- if ($v['type'] == 'checkbox') {
- $value = str_replace('
', '-CHECKBOX-', $ticket[$k]);
- } else {
- $value = $ticket[$k];
- }
- $strippedCustomField = strip_tags($value);
- $linkText .= '&c_' . $k . '=' . $strippedCustomField;
+ /* Delete ticket */
+ if ($can_delete) {
+ if ($reply) {
+ $url = 'admin_ticket.php';
+ $tmp = 'delete_post=' . $reply['id'];
+ $txt = $hesklang['delt'];
+ } else {
+ $url = 'delete_tickets.php';
+ $tmp = 'delete_ticket=1';
+ $txt = $hesklang['dele'];
}
+ $dropdown .= ' ' . $txt . '';
}
-
- $dropdown .= ' ' . $hesklang['create_based_on_contact'] . '';
$dropdown .= ' ';
$options .= $dropdown;
diff --git a/language/en/text.php b/language/en/text.php
index fe7d701d..0f97ece8 100644
--- a/language/en/text.php
+++ b/language/en/text.php
@@ -93,6 +93,7 @@ $hesklang['staff_login_title'] = 'Staff Login';
$hesklang['manage_custom_fields'] = 'Manage Custom Fields';
$hesklang['value'] = 'Value';
$hesklang['readonly'] = 'Readonly';
+$hesklang['copy_ticket'] = 'Copy Ticket';
// ADDED OR MODIFIED IN Mods for HESK 2.6.0
$hesklang['search_logs'] = 'Search Logs';
@@ -466,7 +467,6 @@ $hesklang['verify_your_email'] = 'Your ticket has been created; however your ema
$hesklang['installation_information'] = 'Installation Information';
// ADDED OR MODIFIED IN Mods For HESK 1.6.0
-$hesklang['create_based_on_contact'] = 'Create Ticket For Same Contact';
$hesklang['notify_note_unassigned'] = 'Someone adds a note to a ticket not assigned to me';
$hesklang['can_change_notification_settings'] = 'Can change notification settings';
$hesklang['add_row'] = 'Add row';