From 476627e4d39e2448b74e0d9ccf2d5b66936826e0 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 10 Aug 2020 11:03:05 +1200 Subject: [PATCH] Add Serialize key to payment_processor field for Event & ContributionPage The DAO can handle arrays if it knows the format now... --- CRM/Contribute/DAO/ContributionPage.php | 3 ++- CRM/Contribute/Form/ContributionPage/Amount.php | 2 +- CRM/Event/DAO/Event.php | 3 ++- CRM/Event/Form/ManageEvent/Fee.php | 2 +- xml/schema/Contribute/ContributionPage.xml | 1 + xml/schema/Event/Event.xml | 1 + 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/DAO/ContributionPage.php b/CRM/Contribute/DAO/ContributionPage.php index 7970a2907f99..ae6adec793ac 100644 --- a/CRM/Contribute/DAO/ContributionPage.php +++ b/CRM/Contribute/DAO/ContributionPage.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/ContributionPage.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:63bc96be1f5552249e75545940c13bed) + * (GenCodeChecksum:3b175328a05971d3ec719dfaa7dce03c) */ /** @@ -467,6 +467,7 @@ public static function &fields() { 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', 'localizable' => 0, + 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED, 'html' => [ 'type' => 'Select', ], diff --git a/CRM/Contribute/Form/ContributionPage/Amount.php b/CRM/Contribute/Form/ContributionPage/Amount.php index b90b5ea054f7..305e9f77f6a2 100644 --- a/CRM/Contribute/Form/ContributionPage/Amount.php +++ b/CRM/Contribute/Form/ContributionPage/Amount.php @@ -533,7 +533,7 @@ public function postProcess() { if (array_key_exists('payment_processor', $params) && !CRM_Utils_System::isNull($params['payment_processor']) ) { - $params['payment_processor'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($params['payment_processor'])); + $params['payment_processor'] = array_keys($params['payment_processor']); } else { $params['payment_processor'] = 'null'; diff --git a/CRM/Event/DAO/Event.php b/CRM/Event/DAO/Event.php index adcf39c5d7aa..4fbe874a4929 100644 --- a/CRM/Event/DAO/Event.php +++ b/CRM/Event/DAO/Event.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/Event.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:331a210ceb36b5e9460705dbfbe71abf) + * (GenCodeChecksum:ebf6253bf0eaab82a088defb999bc31b) */ /** @@ -865,6 +865,7 @@ public static function &fields() { 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', 'localizable' => 0, + 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED, 'html' => [ 'type' => 'Select', ], diff --git a/CRM/Event/Form/ManageEvent/Fee.php b/CRM/Event/Form/ManageEvent/Fee.php index 1462a3697c73..8271a4bfe13a 100644 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@ -541,7 +541,7 @@ public function postProcess() { } if (!empty($params['payment_processor'])) { - $params['payment_processor'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($params['payment_processor'])); + $params['payment_processor'] = array_keys($params['payment_processor']); } else { $params['payment_processor'] = 'null'; diff --git a/xml/schema/Contribute/ContributionPage.xml b/xml/schema/Contribute/ContributionPage.xml index 9c08b4738bce..15bd5218edaa 100644 --- a/xml/schema/Contribute/ContributionPage.xml +++ b/xml/schema/Contribute/ContributionPage.xml @@ -80,6 +80,7 @@ payment_processor varchar 128 + SEPARATOR_TRIMMED Payment Processors configured for this contribution Page civicrm_payment_processor
diff --git a/xml/schema/Event/Event.xml b/xml/schema/Event/Event.xml index d4c9c65299df..4c7e51143f85 100644 --- a/xml/schema/Event/Event.xml +++ b/xml/schema/Event/Event.xml @@ -246,6 +246,7 @@ payment_processor varchar 128 + SEPARATOR_TRIMMED Payment Processors configured for this Event (if is_monetary is true) civicrm_payment_processor