CRM-18469, CRM-17984 - getTree - No more pass by reference
authorTim Otten <totten@civicrm.org>
Tue, 26 Apr 2016 19:24:21 +0000 (12:24 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 26 Apr 2016 19:24:21 +0000 (12:24 -0700)
CRM/Activity/Form/Activity.php
CRM/Case/Form/CaseView.php
CRM/Case/Form/CustomData.php
CRM/Contact/Form/CustomData.php
CRM/Contact/Form/Search/Custom/ActivitySearch.php
CRM/Contact/Page/Inline/CustomData.php
CRM/Event/Form/ParticipantView.php
CRM/Grant/Form/GrantView.php

index 9e74fffb56825958435ab7cd728f8c0ea97dd4f0..32dc72b26cc7e4185f3b836b1e74febbf51842f1 100644 (file)
@@ -379,7 +379,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
 
     if ($this->_action & CRM_Core_Action::VIEW) {
       // Get the tree of custom fields.
-      $this->_groupTree = &CRM_Core_BAO_CustomGroup::getTree('Activity', $this,
+      $this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $this,
         $this->_activityId, 0, $this->_activityTypeId
       );
     }
index a597724c53ad9620e6f9f6683e59f61cc121ee41..886e3ef27f0580ec32a0feda0b6b8f67426cffa0 100644 (file)
@@ -161,7 +161,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
 
     $entitySubType = !empty($values['case_type_id']) ? $values['case_type_id'] : NULL;
     $this->assign('caseTypeID', $entitySubType);
-    $groupTree = &CRM_Core_BAO_CustomGroup::getTree('Case',
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree('Case',
       $this,
       $this->_caseID,
       NULL,
index b5c633e163897fac7b64e3c136dbde66125c01e3..81419825fc68d45ac54ac3d78fbd356790edbb52 100644 (file)
@@ -65,7 +65,7 @@ class CRM_Case_Form_CustomData extends CRM_Core_Form {
     $this->_subTypeID = CRM_Utils_Request::retrieve('subType', 'Positive', $this, TRUE);
     $this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
 
-    $groupTree = &CRM_Core_BAO_CustomGroup::getTree('Case',
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree('Case',
       $this,
       $this->_entityID,
       $this->_groupID,
index b38d740313d3cedd49f138e0b2a29b6749b8d9f5..24feb13a81e15cc04225fa1a7b4bbf4e31fab7af 100644 (file)
@@ -230,7 +230,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form {
     if ($this->_cdType || $this->_multiRecordDisplay == 'single') {
       if ($this->_copyValueId) {
         // cached tree is fetched
-        $groupTree = &CRM_Core_BAO_CustomGroup::getTree($this->_type,
+        $groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_type,
           $this,
           $this->_entityId,
           $this->_groupID
@@ -253,7 +253,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form {
       return $customDefaultValue;
     }
 
-    $groupTree = &CRM_Core_BAO_CustomGroup::getTree($this->_contactType,
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType,
       $this,
       $this->_tableID,
       $this->_groupID,
@@ -262,7 +262,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form {
 
     if (empty($_POST['hidden_custom_group_count'])) {
       // custom data building in edit mode (required to handle multi-value)
-      $groupTree = &CRM_Core_BAO_CustomGroup::getTree($this->_contactType, $this, $this->_tableID,
+      $groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType, $this, $this->_tableID,
         $this->_groupID, $this->_contactSubType
       );
       $customValueCount = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, TRUE, $this->_groupID, NULL, NULL, $this->_tableID);
index 6b4da6304df9292d53ef4743cc165038d593c799..d7b8ba87fc93c591e32fdcdb083a0caf8d96dcbd 100644 (file)
@@ -70,7 +70,7 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch extends CRM_Contact_Form_Sea
     );
 
     //Add custom fields to columns array for inclusion in export
-    $groupTree = &CRM_Core_BAO_CustomGroup::getTree('Activity', $form, NULL,
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $form, NULL,
       NULL, '', NULL
     );
 
index f3098df758f5151abc9ad4bf3ffa3e6953e53eac..5d8d31bd477f3ac6cf750fc84af47ab55fe1cd1b 100644 (file)
@@ -51,7 +51,7 @@ class CRM_Contact_Page_Inline_CustomData extends CRM_Core_Page {
     //custom groups Inline
     $entityType = CRM_Contact_BAO_Contact::getContactType($contactId);
     $entitySubType = CRM_Contact_BAO_Contact::getContactSubType($contactId);
-    $groupTree = &CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $contactId,
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $contactId,
       $cgId, $entitySubType
     );
     $details = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $contactId);
index 34ead01720e88d81e3cf9e0bf51ee2950afa5c1c..ee52b4b3c747bae5647cc70bb83b7772ff6bef10 100644 (file)
@@ -140,7 +140,7 @@ class CRM_Event_Form_ParticipantView extends CRM_Core_Form {
 
     foreach ($allRoleIDs as $k => $v) {
       $roleGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', $this, $participantID, NULL, $v, $roleCustomDataTypeID);
-      $eventGroupTree = &CRM_Core_BAO_CustomGroup::getTree('Participant', $this, $participantID, NULL,
+      $eventGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', $this, $participantID, NULL,
         $values[$participantID]['event_id'], $eventNameCustomDataTypeID
       );
       $eventTypeID = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", $values[$participantID]['event_id'], 'event_type_id', 'id');
index fecced4a2ac8013b4416a5c5af54abe6bbaf5fa5..ba7cb835f21180f807ee2102a55a3cd33998ede2 100644 (file)
@@ -117,7 +117,7 @@ class CRM_Grant_Form_GrantView extends CRM_Core_Form {
     $this->assign('attachment', $attachment);
 
     $grantType = CRM_Core_DAO::getFieldValue("CRM_Grant_DAO_Grant", $this->_id, "grant_type_id");
-    $groupTree = &CRM_Core_BAO_CustomGroup::getTree("Grant", $this, $this->_id, 0, $grantType);
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree("Grant", $this, $this->_id, 0, $grantType);
     CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_id);
 
     $this->assign('id', $this->_id);