Browse Source

Fixes #519 Pull from bridge table for status name

tags/3.0.4
Mike Koch 3 years ago
parent
commit
9325d819c7
3 changed files with 11 additions and 9 deletions
  1. +6
    -4
      inc/email_functions.inc.php
  2. +4
    -4
      language/en/emails/html/new_ticket.txt
  3. +1
    -1
      language/en/text.php

+ 6
- 4
inc/email_functions.inc.php View File

@@ -652,9 +652,10 @@ function hesk_getEmailSubject($eml_file, $ticket = '', $is_ticket = 1, $strip =
}

/* Set status */
$statusRs = hesk_dbQuery("SELECT `Key` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . $ticket['status']);
$statusRs = hesk_dbQuery("SELECT `text` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref`
WHERE `status_id` = " . $ticket['status'] . " AND `language` = '". hesk_dbEscape($hesklang['LANGUAGE']) ."'");
$row = hesk_dbFetchAssoc($statusRs);
$ticket['status'] = $hesklang[$row['Key']];
$ticket['status'] = $row['text'];

/* Replace all special tags */
$msg = str_replace('%%SUBJECT%%', $ticket['subject'], $msg);
@@ -815,9 +816,10 @@ function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message
$ticket['owner'] = hesk_msgToPlain(hesk_getOwnerName($ticket['owner']), 1);

/* Set status */
$statusRs = hesk_dbQuery("SELECT `Key` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . $ticket['status']);
$statusRs = hesk_dbQuery("SELECT `text` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref`
WHERE `status_id` = " . $ticket['status'] . " AND `language` = '". hesk_dbEscape($hesklang['LANGUAGE']) ."'");
$row = hesk_dbFetchAssoc($statusRs);
$ticket['status'] = $hesklang[$row['Key']];
$ticket['status'] = $row['text'];

/* Replace all special tags */
$msg = str_replace('%%NAME%%', $ticket['name'], $msg);


+ 4
- 4
language/en/emails/html/new_ticket.txt View File

@@ -2,9 +2,9 @@
<p>Your support ticket "%%SUBJECT%%" has been submitted.</p>
<p>We reply to all tickets as soon as possible, within 24 to 48 hours. If we expect your ticket will take additional time, we will update you by sending you an email.</p>
<p>Ticket tracking ID: %%TRACK_ID%%</p>
<p>You can view the status of your ticket here:
%%TRACK_URL%%</p>
<p>You can view the status of your ticket here: %%TRACK_URL%%</p>
<p>You will receive an email notification when our staff replies to your ticket.</p>
<p>Sincerely,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%
<p>%%SITE_TITLE%% <br /> %%SITE_URL%%</p>
<p>&nbsp;</p>
<p><strong>Ticket Status:</strong> %%STATUS%%</p>

+ 1
- 1
language/en/text.php View File

@@ -576,7 +576,7 @@ $hesklang['add_ticket_your_message']='Your Message';

// EMAIL SUBJECTS
$hesklang['new_ticket_staff'] = '[#%%TRACK_ID%%] New ticket: %%SUBJECT%%';
$hesklang['ticket_received'] = '[#%%TRACK_ID%%] Ticket received: %%SUBJECT%%';
$hesklang['ticket_received'] = '[#%%TRACK_ID%%] Ticket received: %%SUBJECT%%; Status: %%STATUS%%';
$hesklang['ticket_assigned_to_you'] = '[#%%TRACK_ID%%] Ticket assigned: %%SUBJECT%%';
$hesklang['new_reply_by_customer'] = '[#%%TRACK_ID%%] New reply to: %%SUBJECT%%';
$hesklang['new_reply_by_staff'] = '[#%%TRACK_ID%%] New reply to: %%SUBJECT%%';


Loading…
Cancel
Save