Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26546 from eileenmcnaughton/frontend_group
dev/core#4213 Make frontend_title, name required for Group entity
- Loading branch information
Showing
20 changed files
with
147 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
{* file to handle db changes in 5.65.alpha1 during upgrade *} | ||
|
||
-- Ensure new name field is not null/unique. Setting to ID is a bit lazy - but it works. | ||
UPDATE civicrm_group SET `name` = `id` WHERE name IS NULL; | ||
|
||
-- Add name field, make frontend_title required (in conjunction with php function) | ||
{if $multilingual} | ||
{foreach from=$locales item=locale} | ||
UPDATE `civicrm_group` | ||
SET `frontend_title_{$locale}` = `title_{$locale}` | ||
WHERE `frontend_title_{$locale}` IS NULL OR `frontend_title_{$locale}` = ''; | ||
|
||
UPDATE `civicrm_group` | ||
SET `frontend_description_{$locale}` = `description` | ||
WHERE `frontend_description_{$locale}` IS NULL OR `frontend_description_{$locale}` = '' AND `description` <> ''; | ||
{/foreach} | ||
{else} | ||
UPDATE `civicrm_group` | ||
SET `frontend_title` = `title` | ||
WHERE `frontend_title` IS NULL OR `frontend_title` = ''; | ||
|
||
UPDATE `civicrm_group` | ||
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.