CRM-12912
authorDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Thu, 18 Jul 2013 10:44:35 +0000 (16:14 +0530)
committerDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Thu, 18 Jul 2013 10:44:35 +0000 (16:14 +0530)
----------------------------------------
* CRM-12912:
  http://issues.civicrm.org/jira/browse/CRM-12912

CRM/Core/BAO/UFField.php
CRM/UF/Form/Field.php

index 43093458cf8c6951c0de0c33fd557faac18180c5..d5d627c31d12b0d47b33b7c57b406f8082f6abdd 100644 (file)
@@ -824,6 +824,9 @@ SELECT  id
       'Organization' => CRM_Contact_BAO_Contact::importableFields('Organization', FALSE, FALSE, TRUE, TRUE, TRUE),
     );
 
+    // include hook injected fields
+    $fields['Contact'] = array_merge($fields['Contact'], CRM_Contact_BAO_Query_Hook::singleton()->getFields());
+
     // add current employer for individuals
     $fields['Individual']['current_employer'] = array(
       'name' => 'organization_name',
index ae941873df456e52b5074eb1427b467d75853922..1c7849f2c38ee8b5e8f9ee585a6415c5ffb362f9 100644 (file)
@@ -149,6 +149,8 @@ class CRM_UF_Form_Field extends CRM_Core_Form {
       $this->_fields = array_merge(CRM_Event_BAO_Query::getParticipantFields(), $this->_fields);
     }
 
+    $this->_fields = array_merge($this->_fields, CRM_Contact_BAO_Query_Hook::singleton()->getFields());
+
     $this->_selectFields = array();
     foreach ($this->_fields as $name => $field) {
       // lets skip note for now since we dont support it