#365 Finish install changes
This commit is contained in:
parent
989d67a231
commit
bd115aaccb
@ -836,11 +836,20 @@ function execute250Scripts()
|
||||
|
||||
$res = executeQuery("SELECT 1 FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` = 'rich_text_for_tickets' AND `Value` = 1");
|
||||
|
||||
// If HTML is enabled, copy the canned responses to the html column.
|
||||
// If HTML is enabled, copy the canned responses to the html column. Unescape them so they're ready to go for editing.
|
||||
if (hesk_dbNumRows($res) > 0) {
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies` SET `html` = `message`");
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "ticket_templates` SET `html` = `message`");
|
||||
$canned_responses = executeQuery("SELECT `id`, `message` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies`");
|
||||
while ($response = hesk_dbFetchAssoc($canned_responses)) {
|
||||
$message = hesk_html_entity_decode($response['message']);
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies` SET `html` = '" .
|
||||
hesk_dbEscape($message) . "' WHERE `id` = ".intval($response['id']));
|
||||
}
|
||||
$ticket_templates = executeQuery("SELECT `id`, `message` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "ticket_templates`");
|
||||
while ($template = hesk_dbFetchAssoc($ticket_templates)) {
|
||||
$message = hesk_html_entity_decode($template['message']);
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "ticket_templates` SET `html` = '" .
|
||||
hesk_dbEscape($message) . "' WHERE `id` = ".intval($template['id']));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// END Version 2.5.0
|
||||
@ -81,6 +81,8 @@ function removeOtherColumns()
|
||||
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `html`");
|
||||
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "stage_tickets` DROP COLUMN `html`");
|
||||
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` DROP COLUMN `html`");
|
||||
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies` DROP COLUMN `html`");
|
||||
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "ticket_templates` DROP COLUMN `html`");
|
||||
|
||||
|
||||
// These queries are ran in case someone used an unfortunate installation they may have not properly cleaned up tables
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user