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)
committereileen <emcnaughton@wikimedia.org>
Tue, 26 Apr 2016 22:49:22 +0000 (10:49 +1200)
Change-Id: Ia2eb6d2bf64055dc546d2b73ec3ce310846a40f5

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 75d8161637b0ba081904a810a6941a9f7429ffe1..16c00271501c3d092fc8eda04b56e6cdf6af78b0 100644 (file)
@@ -381,8 +381,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
     $this->assign('action', $this->_action);
 
     if ($this->_action & CRM_Core_Action::VIEW) {
-      // get the tree of custom fields
-      $this->_groupTree = &CRM_Core_BAO_CustomGroup::getTree('Activity', $this,
+      // Get the tree of custom fields.
+      $this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $this,
         $this->_activityId, 0, $this->_activityTypeId
       );
     }
index aa7c553c041159f0dca5a74c9a6413220670261f..7e7889deb1f8261854a7d45cdc5fd96de476c2ae 100644 (file)
@@ -182,7 +182,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 c8087c264ee942e1003bc55b92042f43f8315515..bb50d7d24f84f2b757cdeac76f810fb21cdf0369 100644 (file)
@@ -79,7 +79,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 94e790b8d1ca9ee2960e1727c2ca89d5420b88ee..b9c0657ad620304e3cee7ea3d1f0b082e48e6e64 100644 (file)
@@ -239,7 +239,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
@@ -262,7 +262,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,
@@ -271,7 +271,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);
index b78fa15e9354dda49f48e8d96f6c4826b2b6f157..ee006ee78544c43245fc195b4215356358361742 100644 (file)
@@ -73,7 +73,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 acbdcf83e7ad132cf1911eb9dcda73d4331501be..b55d14b35eba786881b044ff59a87ae5802ab010 100644 (file)
@@ -56,7 +56,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);
index 5c9f3c85152082ddb9f2215fd0f09edf70a44c12..e473ddb7f4c8e312355c53ef9aeae0dd5ed9c85e 100644 (file)
@@ -130,7 +130,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 3f09c068d362ed5981fb5301ce3a1215957b340a..4b6b1942eb009108f8d120b52563f34dc9b5e510 100644 (file)
@@ -117,7 +117,8 @@ 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);
 
     $this->assign('id', $this->_id);