From: Sudha Bisht Date: Fri, 22 May 2015 10:11:27 +0000 (+0530) Subject: Fix for website url issue X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a32c865577070fc53cf04065772627ca462830d4;p=civicrm-core.git Fix for website url issue --- 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)) {