#407 Add endpoint for canned responses
This commit is contained in:
parent
0862b9376f
commit
8985413901
@ -9,9 +9,10 @@ hesk_dbConnect();
|
|||||||
|
|
||||||
// Routing
|
// Routing
|
||||||
if (isset($_GET['id'])) {
|
if (isset($_GET['id'])) {
|
||||||
$response = hesk_dbQuery("SELECT `id`, `message`, `html`, `title`, `reply_order` FROM `"
|
$response = hesk_dbQuery("SELECT `id`, `message`, `title`, `reply_order` FROM `"
|
||||||
. hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies` WHERE `id` = ".intval($_GET['id']));
|
. hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies` WHERE `id` = ".intval($_GET['id']));
|
||||||
$result = hesk_dbFetchAssoc($response);
|
$result = hesk_dbFetchAssoc($response);
|
||||||
|
$result['message'] = html_entity_decode($result['message']);
|
||||||
|
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
print json_encode($result);
|
print json_encode($result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user