Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-28-11-04-58
authorkurund <kurund@civicrm.org>
Mon, 28 Apr 2014 18:05:05 +0000 (11:05 -0700)
committerkurund <kurund@civicrm.org>
Mon, 28 Apr 2014 18:05:05 +0000 (11:05 -0700)
1  2 
CRM/Contact/Page/AJAX.php

index 75c2c56a4438bb85292a32b48d4ec10153ba5afd,ddc6f2907c56d24c19bdf2e0bb6f4f6bc01f31e9..d10afbfdd6e6ff6437404955455f49ebf422915d
@@@ -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);