From: Tim Otten Date: Wed, 30 Apr 2014 20:03:48 +0000 (-0700) Subject: Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-30-12-58-23 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2c53a8f729f160b603efc6e8f5eb03c118df6ed3;p=civicrm-core.git Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-30-12-58-23 Conflicts: CRM/Admin/Form/RelationshipType.php --- 2c53a8f729f160b603efc6e8f5eb03c118df6ed3 diff --cc CRM/Admin/Form/RelationshipType.php index 02518986d6,944eba370a..d40d93fbd7 --- a/CRM/Admin/Form/RelationshipType.php +++ b/CRM/Admin/Form/RelationshipType.php @@@ -74,7 -74,9 +74,7 @@@ class CRM_Admin_Form_RelationshipType e 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') . ' ', @@@ -109,13 -114,13 +109,13 @@@ $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; } diff --cc CRM/Event/Cart/Form/Checkout/Payment.php index cff40261a5,58c528faea..8f601bd1e0 --- a/CRM/Event/Cart/Form/Checkout/Payment.php +++ b/CRM/Event/Cart/Form/Checkout/Payment.php @@@ -588,16 -601,11 +588,16 @@@ class CRM_Event_Cart_Form_Checkout_Paym '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; diff --cc CRM/Utils/System.php index ec5a76f9df,b3d9de6755..a8eab723d2 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@@ -784,16 -709,10 +784,17 @@@ class CRM_Utils_System 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';