From: eileenmcnaugton Date: Tue, 4 Aug 2015 10:50:17 +0000 (+1200) Subject: CRM-16523 remove last hook by-pass X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1c98b2d65490bf29bf2e7dffa7fa4671e3ffe983;p=civicrm-core.git CRM-16523 remove last hook by-pass --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index f59cbe4794..6b6edcdb1f 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4015,7 +4015,7 @@ WHERE con.id = {$contributionId} 'check_number', 'payment_instrument_id', 'is_test', - 'campaign_id' + 'campaign_id', ); $contributionParams = array_merge(array( @@ -4181,14 +4181,11 @@ LIMIT 1;"; $contributionParams['receipt_date'] = $changeDate; $values['is_email_receipt'] = 1; } + $participantParams['id'] = $participant->id; if (empty($input['IAmAHorribleNastyBeyondExcusableHackInTheCRMEventFORMTaskClassThatNeedsToBERemoved'])) { - $participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array( - 'labelColumn' => 'name', - 'flip' => 1, - )); - $participant->status_id = $participantStatuses['Registered']; + $participantParams['status_id'] = 'Registered'; } - $participant->save(); + civicrm_api3('Participant', 'create', $participantParams); } $contributionParams['id'] = $contribution->id;