From 4961a32523b0381b0efb0adc9c69250f5c5d45f2 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Fri, 13 Dec 2019 15:49:34 +0530 Subject: [PATCH] dev/core#1473 - Missing address on /user when location type label differs from its name Fix issues found by demerit --- CRM/Contact/BAO/Contact.php | 2 +- CRM/Core/BAO/UFGroup.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 644b365683..f0fa6c72b4 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -1781,7 +1781,7 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer'); * A hierarchical property tree if appropriate */ public static function &makeHierReturnProperties($fields, $contactId = NULL) { - $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'); + $locationTypes = CRM_Core_BAO_Address::buildOptions('location_type_id', 'validate'); $returnProperties = []; diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 0e22975832..ea56ed7935 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -989,11 +989,10 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { } } $query->convertToPseudoNames($details); - $config = CRM_Core_Config::singleton(); - $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'); - $imProviders = CRM_Core_PseudoConstant::get('CRM_Core_DAO_IM', 'provider_id'); - $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id'); + $locationTypes = CRM_Core_BAO_Address::buildOptions('location_type_id', 'validate'); + $imProviders = CRM_Core_DAO_IM::buildOptions('provider_id'); + $websiteTypes = CRM_Core_DAO_Website::buildOptions('website_type_id'); $multipleFields = ['url']; -- 2.25.1