diff --git a/include/class.template.php b/include/class.template.php index 88f3e5c5701383cca67b68f55764d0f30eb92262..4394c0fc1af09a7fbeeb2d3a06c7de1f550afea2 100644 --- a/include/class.template.php +++ b/include/class.template.php @@ -79,14 +79,6 @@ class EmailTemplateGroup { 'group'=>'ticket.staff', 'name'=>'Overdue Ticket Alert', 'desc'=>'Alert sent to staff on stale or overdue tickets.'), - 'staff.pwreset' => array( - 'group'=>'sys', - 'name' => 'Staff Password Reset', - 'desc' => 'Notice sent to staff with the password reset link.'), - 'user.accesslink' => array( - 'group'=>'sys', - 'name' => 'User Access Link Recovery', - 'desc' => 'Notice sent to user on request with ticket access link.'), ); function EmailTemplateGroup($id){ diff --git a/include/i18n/en_US/templates/email/staff.pwreset.yaml b/include/i18n/en_US/templates/email/staff.pwreset.yaml deleted file mode 100644 index 12f6fd0f3d1268fc29a30281d6019b6c1ab0b3bf..0000000000000000000000000000000000000000 --- a/include/i18n/en_US/templates/email/staff.pwreset.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# -# Email template: staff.pwreset -# -# Sent when a staff member requests a password reset via the <a>Forgot my -# password</a> link in the staff control login screen -# ---- -notes: | - Sent when a staff member requests a password reset via the <a>Forgot my - password</a> link in the staff control login screen - -subject: | - osTicket Staff Password Reset -body: | - <h3><strong>Hi %{staff.name.first},</strong></h3> - A password reset request has been submitted on your behalf for the - helpdesk at %{url}. - <br> - <br> - If you feel that this has been done in error, delete and disregard this - email. Your account is still secure and no one has been given access to - it. It is not locked and your password has not been reset. Someone could - have mistakenly entered your email address. - <br> - <br> - Follow the link below to login to the help desk and change your - password. - <br> - <br> - <a href="%{reset_link}">%{reset_link}</a> - <br> - <br> - <em style="font-size: small">Your friendly Customer Support System</em> - <br> - <img src="cid:b56944cb4722cc5cda9d1e23a3ea7fbc" alt="Powered by osTicket" - width="126" height="19" style="width: 126px;"> diff --git a/include/i18n/en_US/templates/email/user.accesslink.yaml b/include/i18n/en_US/templates/email/user.accesslink.yaml deleted file mode 100644 index acd50fe0fd5b9c89b9efffffa72e271b85491f0e..0000000000000000000000000000000000000000 --- a/include/i18n/en_US/templates/email/user.accesslink.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# -# Email template: user.accesslink -# -# Sent when a user requests an access link to check the status of a ticket -# -# -# ---- -notes: | - Sent when a user requests an access link to check the status of a ticket - -subject: | - Ticket [#%{ticket.number}] Access Link -body: | - <h3><strong>Hi %{recipient.name.first},</strong></h3> - An access link request for ticket #%{ticket.number} has been submitted on your behalf for the - helpdesk at %{url}. - <br> - <br> - Follow the link below to check the status of the ticket #%{ticket.number}. - <br> - <br> - <a href="%{recipient.ticket_link}">%{recipient.ticket_link}</a> - <br> - <br>If you <strong>did not</strong> make the request, please delete - and disregard this email. Your account is still secure and no one has - been given access to the ticket. Someone could have mistakenly entered - your email address. - <br> - <br> - --<br> - %{company.name} diff --git a/include/upgrader/streams/core/f5692e24-4323a6a8.patch.sql b/include/upgrader/streams/core/f5692e24-4323a6a8.patch.sql index aa672ccc9349c0a90b2888d8d96361017a7c58e3..36b92688fb366a3ec38aa6f321441daa063eea26 100644 --- a/include/upgrader/streams/core/f5692e24-4323a6a8.patch.sql +++ b/include/upgrader/streams/core/f5692e24-4323a6a8.patch.sql @@ -88,6 +88,34 @@ CREATE TABLE `%TABLE_PREFIX%organization` ( DELETE FROM `%TABLE_PREFIX%config` where `namespace`='core' AND `key` = 'show_related_tickets'; +-- Transfer access link template +INSERT INTO `%TABLE_PREFIX%content` + (`name`, `body`, `type`, `isactive`) + SELECT A1.`subject`, A1.`body`, 'access-link', 1 + FROM `%TABLE_PREFIX%email_template` A1 + WHERE A1.`tpl_id` = (SELECT `value` FROM `%TABLE_PREFIX%config` A3 + WHERE A3.`key` = 'default_template_id' and `namespace` = 'core') + AND A1.`code_name` = 'user.accesslink'; + +UPDATE `%TABLE_PREFIX%content` SET `content_id` = LAST_INSERT_ID() + WHERE `id` = LAST_INSERT_ID(); + +-- Transfer staff password reset link +INSERT INTO `%TABLE_PREFIX%content` + (`name`, `body`, `type`, `isactive`) + SELECT A1.`subject`, A1.`body`, 'pwreset-staff', 1 + FROM `%TABLE_PREFIX%email_template` A1 + WHERE A1.`tpl_id` = (SELECT `value` FROM `%TABLE_PREFIX%config` A3 + WHERE A3.`key` = 'default_template_id' and `namespace` = 'core') + AND A1.`code_name` = 'staff.pwreset'; + +UPDATE `%TABLE_PREFIX%content` SET `content_id` = LAST_INSERT_ID() + WHERE `id` = LAST_INSERT_ID(); + +-- No longer saved in the email_template table +DELETE FROM `%TABLE_PREFIX%email_template` + WHERE `code_name` IN ('staff.pwreset', 'user.accesslink'); + -- Finished with patch UPDATE `%TABLE_PREFIX%config` SET `value` = '4323a6a81c35efbf7722b7fc4e475440'