From 8f31a8d232df39c8b49362f172bb3f9062dd27c2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 10 Jul 2023 11:42:42 +1200 Subject: [PATCH] Update the welcome mailing component It now uses tokens not the now-deprecated function --- CRM/Upgrade/Incremental/sql/5.65.alpha1.mysql.tpl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/5.65.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.65.alpha1.mysql.tpl index 42eaa26b4c..e2cfc0d51a 100644 --- a/CRM/Upgrade/Incremental/sql/5.65.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.65.alpha1.mysql.tpl @@ -7,11 +7,11 @@ UPDATE civicrm_group SET `name` = `id` WHERE name IS NULL; {if $multilingual} {foreach from=$locales item=locale} UPDATE `civicrm_group` - SET `frontend_title_{$locale}` = `title_{$locale}`, + SET `frontend_title_{$locale}` = `title_{$locale}` WHERE `frontend_title_{$locale}` IS NULL OR `frontend_title_{$locale}` = ''; UPDATE `civicrm_group` - SET `frontend_description_{$locale}` = `description_{$locale}`, + SET `frontend_description_{$locale}` = `description_{$locale}` WHERE `frontend_description_{$locale}` IS NULL OR `frontend_description_{$locale}` = '' AND 'description_{$locale}` <> ''; {/foreach} {else} @@ -23,3 +23,9 @@ UPDATE civicrm_group SET `name` = `id` WHERE name IS NULL; SET `frontend_description` = `description` WHERE `frontend_description` IS NULL OR `frontend_description` = '' AND description <> ''; {/if} + +UPDATE civicrm_mailing_component +SET body_html = REPLACE(body_html, '{welcome.group}', '{group.frontend_title}'), +body_text = REPLACE(body_text, '{welcome.group}', '{group.frontend_title}'), +subject = REPLACE(subject, '{welcome.group}', '{group.frontend_title}') +WHERE component_type = 'Welcome'; -- 2.25.1