From 079ccec0da1e3e389c2406271de674b62c9f6fb9 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 17 Jul 2023 13:36:51 +1200 Subject: [PATCH] Remove never-true-if --- CRM/Custom/Form/CustomDataByType.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CRM/Custom/Form/CustomDataByType.php b/CRM/Custom/Form/CustomDataByType.php index 3da4d26213..2462c8c883 100644 --- a/CRM/Custom/Form/CustomDataByType.php +++ b/CRM/Custom/Form/CustomDataByType.php @@ -16,7 +16,13 @@ */ /** - * This form is intended to replace the overloading of many forms to generate a snippet for custom data. + * This form is loaded when custom data is loaded by ajax. + * + * The forms ALSO need to call enough functions from Form_CustomData + * to ensure the fields they need are added to the form or the values will be + * ignored in post process (ie. quick form will filter them out). + * + * This form never submits & hence has no post process. */ class CRM_Custom_Form_CustomDataByType extends CRM_Core_Form { @@ -71,9 +77,6 @@ class CRM_Custom_Form_CustomDataByType extends CRM_Core_Form { $singleRecord ); - if (property_exists($this, '_customValueCount') && !empty($groupTree)) { - $this->_customValueCount = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, TRUE, NULL, NULL, NULL, $this->_entityId); - } // we should use simplified formatted groupTree $groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, $this->_groupCount, $this); -- 2.25.1