CRM-16450 fix for multiple custom fields
authorEileen McNaughton <eileen@fuzion.co.nz>
Sun, 17 May 2015 23:36:13 +0000 (11:36 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sun, 17 May 2015 23:36:13 +0000 (11:36 +1200)
CRM/Contact/Page/View/CustomData.php

index ff16d1310748b1734751c4f6dabf52e931d45872..19c8063372967810e7b5e3380f69ef4084540f59 100644 (file)
@@ -112,7 +112,7 @@ class CRM_Contact_Page_View_CustomData extends CRM_Core_Page {
       //Custom Groups Inline
       $entityType = CRM_Contact_BAO_Contact::getContactType($this->_contactId);
       $entitySubType = CRM_Contact_BAO_Contact::getContactSubType($this->_contactId);
-      $groupTree = &CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $this->_contactId,
+      $groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $this->_contactId,
         $this->_groupId, $entitySubType
       );
 
@@ -142,6 +142,8 @@ class CRM_Contact_Page_View_CustomData extends CRM_Core_Page {
         $page->set('multiRecordFieldListing', $multiRecordFieldListing);
         $page->set('pageViewType', 'customDataView');
         $page->set('contactType', $ctype);
+        $page->assign('viewCustomData', array($this->_groupId => array($this->_groupId =>
+          $groupTree[$this->_groupId])));
         $page->run();
       }
       else {