CRM_Core_DAO::getAttribute('CRM_Contact_DAO_RelationshipType', 'description')
);
- $contactTypes = CRM_Contact_BAO_ContactType::getSelectElements();
-
-
+ $contactTypes = CRM_Contact_BAO_ContactType::getSelectElements(FALSE, TRUE, '__');
// add select for contact type
$contactTypeA = &$this->add('select', 'contact_types_a', ts('Contact Type A') . ' ',
$baoName = $this->_BAOName;
$baoName::retrieve($params, $defaults);
$defaults['contact_types_a'] = CRM_Utils_Array::value('contact_type_a', $defaults);
- if (CRM_Utils_Array::value('contact_sub_type_a', $defaults)) {
+ if (!empty($defaults['contact_sub_type_a'])) {
- $defaults['contact_types_a'] .= CRM_Core_DAO::VALUE_SEPARATOR . $defaults['contact_sub_type_a'];
+ $defaults['contact_types_a'] .= '__' . $defaults['contact_sub_type_a'];
}
$defaults['contact_types_b'] = $defaults['contact_type_b'];
- if (CRM_Utils_Array::value('contact_sub_type_b', $defaults)) {
+ if (!empty($defaults['contact_sub_type_b'])) {
- $defaults['contact_types_b'] .= CRM_Core_DAO::VALUE_SEPARATOR . $defaults['contact_sub_type_b'];
+ $defaults['contact_types_b'] .= '__' . $defaults['contact_sub_type_b'];
}
return $defaults;
}
'contribution_status_id' => $params['contribution_status_id'],
'payment_instrument_id' => $params['payment_instrument_id'],
'check_number' => CRM_Utils_Array::value('check_number', $params),
+ 'skipLineItem' => 1,
);
- $contribution = &CRM_Contribute_BAO_Contribution::add($contribParams, $ids);
+ if (is_array($this->_paymentProcessor)) {
+ $contribParams['payment_processor'] = $this->_paymentProcessor['id'];
+ }
+
+ $contribution = &CRM_Contribute_BAO_Contribution::add($contribParams);
if (is_a($contribution, 'CRM_Core_Error')) {
- CRM_Core_Error::fatal(ts("There was an error creating a contribution record for your event. Please report this error to the webmaster. Details: %1\n", array(1 => $contribution->getMessages($contribution))));
+ CRM_Core_Error::fatal(ts("There was an error creating a contribution record for your event. Please report this error to the webmaster. Details: %1", array(1 => $contribution->getMessages($contribution))));
}
$mer_participant->contribution_id = $contribution->id;
$params['contributionID'] = $contribution->id;
return $memory;
}
+ /**
+ * @param string $name
+ * @param string $mimeType
+ * @param $buffer
+ * @param string $ext
+ * @param bool $output
+ */
static function download($name, $mimeType, &$buffer,
$ext = NULL,
- $output = TRUE
+ $output = TRUE,
+ $disposition = 'attachment'
) {
$now = gmdate('D, d M Y H:i:s') . ' GMT';