From a32c865577070fc53cf04065772627ca462830d4 Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Fri, 22 May 2015 15:41:27 +0530 Subject: [PATCH] Fix for website url issue --- CRM/Contact/Selector.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index af8083ad81..d03e948fca 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -582,6 +582,9 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se if ($id == 'Primary') { $locationTypeName = 1; } + elseif ($fieldName == 'url') { + $locationTypeName = "website-{$id}"; + } else { $locationTypeName = CRM_Utils_Array::value($id, $locationTypes); if (!$locationTypeName) { @@ -691,7 +694,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se } elseif (strpos($property, '-url') !== FALSE) { $websiteUrl = ''; - $websiteKey = 'website-1'; + $websiteKey = str_replace('-url', '', $property); $propertyArray = explode('-', $property); $websiteFld = $websiteKey . '-' . array_pop($propertyArray); if (!empty($result->$websiteFld)) { -- 2.25.1