Skip to content

Commit

Permalink
Merge pull request #262 from ufundo/core-frontend-group-values
Browse files Browse the repository at this point in the history
Use frontend_title and frontend_description as group defaults
  • Loading branch information
rajeshrhino authored Oct 22, 2021
2 parents 96476a5 + d8456cb commit 03d314a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions CRM/Gdpr/Form/CommunicationsPreferences.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,7 @@ public function setDefaultValues() {
// If value is missing in the setting, take the corresponding value from the
// group.
foreach($map as $setting_key => $group_key) {
if (empty($item[$setting_key]) && !empty($grp[$group_key])) {
$item[$setting_key] = $grp[$group_key];
}
$item[$setting_key] = $item[$setting_key] ?? $grp['frontend_' . $group_key] ?? $grp[$group_key];
}
// Set default weight.
if (empty($item['group_weight'])) {
Expand Down

0 comments on commit 03d314a

Please sign in to comment.