From: yashodha Date: Wed, 1 Jul 2015 10:54:43 +0000 (+0530) Subject: CRM-16735: PCP notification email should not be sent when contribution record is... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a983d7d1e6e4b2049337799517328a838296fdfa;p=civicrm-core.git CRM-16735: PCP notification email should not be sent when contribution record is updated UNLESS a new PCP soft credit is added ---------------------------------------- * CRM-16735: PCP notification email should not be sent when contribution record is updated UNLESS a new PCP soft credit is added https://issues.civicrm.org/jira/browse/CRM-16735 --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index a4ab84a2a4..aaaebbb8d6 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -391,7 +391,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { $softParams['soft_credit_type_id'] = CRM_Core_OptionGroup::getValue('soft_credit_type', 'pcp', 'name'); $contributionSoft = CRM_Contribute_BAO_ContributionSoft::add($softParams); //Send notification to owner for PCP - if ($contributionSoft->pcp_id) { + if ($contributionSoft->pcp_id && empty($params['soft_credit_ids'])) { CRM_Contribute_Form_Contribution_Confirm::pcpNotifyOwner($contribution, $contributionSoft); } }