From: kurund Date: Mon, 28 Apr 2014 18:05:05 +0000 (-0700) Subject: Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-28-11-04-58 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8906b92a00b4907e620e80624fb6ac6baa368bed;p=civicrm-core.git Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-28-11-04-58 --- 8906b92a00b4907e620e80624fb6ac6baa368bed diff --cc CRM/Contact/Page/AJAX.php index 75c2c56a44,ddc6f2907c..d10afbfdd6 --- a/CRM/Contact/Page/AJAX.php +++ b/CRM/Contact/Page/AJAX.php @@@ -98,13 -102,14 +98,13 @@@ class CRM_Contact_Page_AJAX // check that this is a valid, active custom field of Contact Reference type $params = array('id' => $cfID); $returnProperties = array('filter', 'data_type', 'is_active'); - $fldValues = array(); + $fldValues = $cf = array(); CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_CustomField', $params, $cf, $returnProperties); - if (!$cf['id'] || !$cf['is_active'] || $cf['data_type'] = !'ContactReference') { - echo "$name|error\n"; - CRM_Utils_System::civiExit(); + if (!$cf['id'] || !$cf['is_active'] || $cf['data_type'] != 'ContactReference') { + CRM_Core_Page_AJAX::autocompleteResults(array('error' => $name)); } - if ($cf['filter']) { + if (!empty($cf['filter'])) { $filterParams = array(); parse_str($cf['filter'], $filterParams);