X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FForm%2FParticipant.php;h=1bd751a84818dfd247aa6915cdf6f0c07e64aa10;hb=def09a3c5a44625dea02d0989152ab9dc1823487;hp=ab8f474cc881024b728a834faceff00fd99ac1a6;hpb=e7309307116da31e6ee7da3a240692439fc6d936;p=civicrm-core.git diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index ab8f474cc8..1bd751a848 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -189,6 +189,13 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment */ public $_onlinePendingContributionId = NULL; + /** + * Explicitly declare the entity api name. + */ + public function getDefaultEntity() { + return 'Participant'; + } + /** * Set variables up before form is built. * @@ -322,7 +329,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment $this->_action = CRM_Core_Action::COPY; break; } - parent::preProcess(); + CRM_Contact_Form_Task::preProcessCommon($this); $this->_single = FALSE; $this->_contactId = NULL; @@ -1043,7 +1050,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment unset($params['amount']); } $params['register_date'] = CRM_Utils_Date::processDate($params['register_date'], $params['register_date_time']); - $params['receive_date'] = CRM_Utils_Date::processDate(CRM_Utils_Array::value('receive_date', $params)); + $params['receive_date'] = CRM_Utils_Date::processDate(CRM_Utils_Array::value('receive_date', $params), CRM_Utils_Array::value('receive_date_time', $params)); $params['contact_id'] = $this->_contactId; // overwrite actual payment amount if entered @@ -1157,7 +1164,6 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment $customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEvent, $customFields); $customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEventType, $customFields); $params['custom'] = CRM_Core_BAO_CustomField::postProcess($params, - $customFields, $this->_id, 'Participant' ); @@ -1202,7 +1208,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment // CRM-15622: fix for incorrect contribution.fee_amount $paymentParams['fee_amount'] = NULL; - $result = $payment->doDirectPayment($paymentParams); + $result = $payment->doPayment($paymentParams); if (is_a($result, 'CRM_Core_Error')) { CRM_Core_Error::displaySessionError($result); @@ -1253,7 +1259,6 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment //add custom data for participant CRM_Core_BAO_CustomValueTable::postProcess($this->_params, - CRM_Core_DAO::$_nullArray, 'civicrm_participant', $participants[0]->id, 'Participant'