Allow retrieval of all canned responses / ticket tpls
This commit is contained in:
parent
99193274df
commit
5851c4d7f2
@ -21,4 +21,16 @@ if (isset($_GET['id'])) {
|
||||
header('Content-Type: application/json');
|
||||
print json_encode($result);
|
||||
return http_response_code(200);
|
||||
}
|
||||
}
|
||||
|
||||
$response = hesk_dbQuery("SELECT `id`, `message`, `title`, `reply_order` FROM `"
|
||||
. hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies`");
|
||||
$results = [];
|
||||
while ($row = hesk_dbFetchAssoc($response)) {
|
||||
$row['title'] = hesk_html_entity_decode($row['title']);
|
||||
$row['message'] = hesk_html_entity_decode($row['message']);
|
||||
$results[] = $row;
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
print json_encode($results);
|
||||
return http_response_code(200);
|
||||
@ -21,4 +21,16 @@ if (isset($_GET['id'])) {
|
||||
header('Content-Type: application/json');
|
||||
print json_encode($result);
|
||||
return http_response_code(200);
|
||||
}
|
||||
}
|
||||
|
||||
$response = hesk_dbQuery("SELECT `id`, `message`, `title`, `tpl_order` FROM `"
|
||||
. hesk_dbEscape($hesk_settings['db_pfix']) . "ticket_templates`");
|
||||
$results = [];
|
||||
while ($row = hesk_dbFetchAssoc($response)) {
|
||||
$row['title'] = hesk_html_entity_decode($row['title']);
|
||||
$row['message'] = hesk_html_entity_decode($row['message']);
|
||||
$results[] = $row;
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
print json_encode($results);
|
||||
return http_response_code(200);
|
||||
Loading…
x
Reference in New Issue
Block a user