<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
$this->assign('profileTitle', $this->_title);
$this->assign('componentIds', $this->_contributionIds);
- $fileFieldExists = FALSE;
//load all campaigns.
if (array_key_exists('contribution_campaign_id', $this->_fields)) {
foreach ($this->_fields as $name => $field) {
if ($customFieldID = CRM_Core_BAO_CustomField::getKeyID($name)) {
$customValue = CRM_Utils_Array::value($customFieldID, $customFields);
- if (CRM_Utils_Array::value('extends_entity_column_value', $customValue)) {
+ if (!empty($customValue['extends_entity_column_value'])) {
$entityColumnValue = explode(CRM_Core_DAO::VALUE_SEPARATOR,
$customValue['extends_entity_column_value']
);
}
- if (CRM_Utils_Array::value($typeId, $entityColumnValue) ||
+ if (!empty($entityColumnValue[$typeId]) ||
CRM_Utils_System::isNull($entityColumnValue[$typeId])
) {
CRM_Core_BAO_UFGroup::buildProfile($this, $field, NULL, $contributionId);
*
* @access public
*
- * @return None
+ * @return void
*/
function setDefaultValues() {
if (empty($this->_fields)) {
*
* @access public
*
- * @return None
+ * @return void
*/
public function postProcess() {
$params = $this->exportValues();
$value[$val] = CRM_Utils_Date::processDate($value[$val]);
}
}
- if (CRM_Utils_Array::value('financial_type', $value)) {
+ if (!empty($value['financial_type'])) {
$value['financial_type_id'] = $value['financial_type'];
}
- if (CRM_Utils_Array::value('payment_instrument', $value)) {
+ if (!empty($value['payment_instrument'])) {
$value['payment_instrument_id'] = $value['payment_instrument'];
}
- if (CRM_Utils_Array::value('contribution_source', $value)) {
+ if (!empty($value['contribution_source'])) {
$value['source'] = $value['contribution_source'];
}
$contribution = CRM_Contribute_BAO_Contribution::add($value, $ids);
// add custom field values
- if (CRM_Utils_Array::value('custom', $value) &&
+ if (!empty($value['custom']) &&
is_array($value['custom'])
) {
CRM_Core_BAO_CustomValueTable::store($value['custom'], 'civicrm_contribution', $contribution->id);