projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup deprecated CRM_Core_BAO_Settings calls CRM-17507
[civicrm-core.git]
/
CRM
/
Event
/
Form
/
Participant.php
diff --git
a/CRM/Event/Form/Participant.php
b/CRM/Event/Form/Participant.php
index a3ef71f36bebd8b1ba10bac16b106bc8d4685fc7..373da816fb29ff2ceea3a8f1f7a7a3a6c9a20750 100644
(file)
--- a/
CRM/Event/Form/Participant.php
+++ b/
CRM/Event/Form/Participant.php
@@
-1,7
+1,7
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
6
|
+ | CiviCRM version 4.
7
|
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
@@
-153,6
+153,8
@@
class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
/**
* Contribution mode for event registration for offline mode.
/**
* Contribution mode for event registration for offline mode.
+ *
+ * @deprecated
*/
public $_contributeMode = 'direct';
*/
public $_contributeMode = 'direct';
@@
-806,7
+808,7
@@
class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
if (!empty($values['payment_processor_id'])) {
// make sure that payment instrument values (e.g. credit card number and cvv) are valid
if (!empty($values['payment_processor_id'])) {
// make sure that payment instrument values (e.g. credit card number and cvv) are valid
- CRM_Core_Payment_Form::validatePaymentInstrument($values['payment_processor_id'], $values, $errorMsg,
$self
);
+ CRM_Core_Payment_Form::validatePaymentInstrument($values['payment_processor_id'], $values, $errorMsg,
NULL
);
}
if (!empty($values['record_contribution'])) {
}
if (!empty($values['record_contribution'])) {
@@
-814,7
+816,7
@@
class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
$errorMsg['financial_type_id'] = ts('Please enter the associated Financial Type');
}
if (empty($values['payment_instrument_id'])) {
$errorMsg['financial_type_id'] = ts('Please enter the associated Financial Type');
}
if (empty($values['payment_instrument_id'])) {
- $errorMsg['payment_instrument_id'] = ts('Pa
id By
is a required field.');
+ $errorMsg['payment_instrument_id'] = ts('Pa
yment Method
is a required field.');
}
}
}
}
@@
-1571,6
+1573,7
@@
class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
CRM_Utils_System::mungeCreditCard($params['credit_card_number'])
);
$this->assign('credit_card_type', $params['credit_card_type']);
CRM_Utils_System::mungeCreditCard($params['credit_card_number'])
);
$this->assign('credit_card_type', $params['credit_card_type']);
+ // The concept of contributeMode is deprecated.
$this->assign('contributeMode', 'direct');
$this->assign('isAmountzero', 0);
$this->assign('is_pay_later', 0);
$this->assign('contributeMode', 'direct');
$this->assign('isAmountzero', 0);
$this->assign('is_pay_later', 0);
@@
-1620,7
+1623,7
@@
class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
if ($this->_isPaidEvent) {
// fix amount for each of participants ( for bulk mode )
$eventAmount = array();
if ($this->_isPaidEvent) {
// fix amount for each of participants ( for bulk mode )
$eventAmount = array();
- $invoiceSettings = C
RM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,
'contribution_invoice_settings');
+ $invoiceSettings = C
ivi::settings()->get(
'contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$totalTaxAmount = 0;
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$totalTaxAmount = 0;
@@
-1686,7
+1689,7
@@
class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
$contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment',
$this->_id, 'contribution_id', 'participant_id'
);
$contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment',
$this->_id, 'contribution_id', 'participant_id'
);
- $prefixValue = C
RM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,
'contribution_invoice_settings');
+ $prefixValue = C
ivi::settings()->get(
'contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
if (count($taxAmt) > 0 && (isset($invoicing) && isset($prefixValue['is_email_pdf']))) {
$sendTemplateParams['isEmailPdf'] = TRUE;
$invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
if (count($taxAmt) > 0 && (isset($invoicing) && isset($prefixValue['is_email_pdf']))) {
$sendTemplateParams['isEmailPdf'] = TRUE;