X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FDeprecatedUtils.php;h=af1b411902e2c1f0e83443d4f822e543c4ef84d5;hb=ac177c7ce7fb0686417d53c5fc4168d643c38d42;hp=ebde5c37542a5274529a797d3090d60962a90538;hpb=b5b27619ebbff04079eddea91a31b42bbd8ca540;p=civicrm-core.git diff --git a/CRM/Utils/DeprecatedUtils.php b/CRM/Utils/DeprecatedUtils.php index ebde5c3754..af1b411902 100644 --- a/CRM/Utils/DeprecatedUtils.php +++ b/CRM/Utils/DeprecatedUtils.php @@ -135,24 +135,7 @@ function _civicrm_api3_deprecated_activity_formatted_param(&$params, &$values, $ $values[$key] = $value; $type = $customFields[$customFieldID]['html_type']; if (CRM_Core_BAO_CustomField::isSerialized($customFields[$customFieldID])) { - $mulValues = explode(',', $value); - $customOption = CRM_Core_BAO_CustomOption::getCustomOption($customFieldID, TRUE); - $values[$key] = []; - foreach ($mulValues as $v1) { - foreach ($customOption as $customValueID => $customLabel) { - $customValue = $customLabel['value']; - if ((strtolower(trim($customLabel['label'])) == strtolower(trim($v1))) || - (strtolower(trim($customValue)) == strtolower(trim($v1))) - ) { - if ($type == 'CheckBox') { - $values[$key][$customValue] = 1; - } - else { - $values[$key][] = $customValue; - } - } - } - } + $values[$key] = CRM_Import_Parser::unserializeCustomValue($customFieldID, $value, $type); } elseif ($type == 'Select' || $type == 'Radio') { $customOption = CRM_Core_BAO_CustomOption::getCustomOption($customFieldID, TRUE);