From f5eb2e0bc0d55894b67cba508e678b31c998bcbf Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 19 Feb 2023 11:03:53 +1300 Subject: [PATCH] Stop loaded unused relatedObjects --- CRM/Contribute/BAO/Contribution.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 941f594678..89d7628796 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2678,11 +2678,6 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac // This is a call we want to use less, in favour of loading related objects. $values = $this->addContributionPageValuesToValuesHeavyHandedly($values); if ($this->contribution_page_id) { - // This is precautionary as there are some legacy flows, but it should really be - // loaded by now. - if (!isset($this->_relatedObjects['contributionPage'])) { - $this->loadRelatedEntitiesByID(['contributionPage' => $this->contribution_page_id]); - } CRM_Contribute_BAO_Contribution_Utils::overrideDefaultCurrency($values); } } @@ -4565,9 +4560,6 @@ LIMIT 1;"; $entities = [ 'contact' => 'CRM_Contact_BAO_Contact', 'contributionRecur' => 'CRM_Contribute_BAO_ContributionRecur', - 'contributionType' => 'CRM_Financial_BAO_FinancialType', - 'financialType' => 'CRM_Financial_BAO_FinancialType', - 'contributionPage' => 'CRM_Contribute_BAO_ContributionPage', ]; foreach ($entities as $entity => $bao) { if (!empty($ids[$entity])) { -- 2.25.1