Skip to content
Snippets Groups Projects
Unverified Commit e45fa449 authored by DaveD's avatar DaveD Committed by GitHub
Browse files

Merge pull request #31156 from eileenmcnaughton/label_no_prefs

Remove some legacy copy & paste from mailing labels
parents d8fbc070 bfaef59a
Branches
Tags
No related merge requests found
......@@ -230,16 +230,6 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task {
// format the addresses according to CIVICRM_ADDRESS_FORMAT (CRM-1327)
foreach ($rows as $id => $row) {
$commMethods = $row['preferred_communication_method'] ?? NULL;
if ($commMethods) {
$val = array_filter(explode(CRM_Core_DAO::VALUE_SEPARATOR, $commMethods));
$comm = CRM_Contact_DAO_Contact::buildOptions('preferred_communication_method');
$temp = [];
foreach ($val as $vals) {
$temp[] = $comm[$vals];
}
$row['preferred_communication_method'] = implode(', ', $temp);
}
$row['id'] = $id;
$formatted = CRM_Utils_Address::formatMailingLabel($row);
$rows[$id] = [$formatted];
......
......@@ -91,16 +91,6 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task {
}
// format the addresses according to CIVICRM_ADDRESS_FORMAT (CRM-1327)
foreach ((array) $rows as $id => $row) {
$commMethods = $row['preferred_communication_method'] ?? NULL;
if ($commMethods) {
$val = array_filter(explode(CRM_Core_DAO::VALUE_SEPARATOR, $commMethods));
$comm = CRM_Contact_DAO_Contact::buildOptions('preferred_communication_method');
$temp = [];
foreach ($val as $vals) {
$temp[] = $comm[$vals];
}
$row['preferred_communication_method'] = implode(', ', $temp);
}
$row['id'] = $id;
$formatted = CRM_Utils_Address::formatMailingLabel($row);
$rows[$id] = [$formatted];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment