Add Serialize key to payment_processor field for Event & ContributionPage
authoreileen <emcnaughton@wikimedia.org>
Sun, 9 Aug 2020 23:03:05 +0000 (11:03 +1200)
committereileen <emcnaughton@wikimedia.org>
Sun, 9 Aug 2020 23:06:53 +0000 (11:06 +1200)
The DAO can handle arrays if it knows the format now...

CRM/Contribute/DAO/ContributionPage.php
CRM/Contribute/Form/ContributionPage/Amount.php
CRM/Event/DAO/Event.php
CRM/Event/Form/ManageEvent/Fee.php
xml/schema/Contribute/ContributionPage.xml
xml/schema/Event/Event.xml

index 7970a2907f992564ca7e2f2fa35c7833461eef97..ae6adec793ac4a8eb35fb1b067e5986b6378e94e 100644 (file)
@@ -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 @@ class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO {
           'entity' => 'ContributionPage',
           'bao' => 'CRM_Contribute_BAO_ContributionPage',
           'localizable' => 0,
+          'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
           'html' => [
             'type' => 'Select',
           ],
index b90b5ea054f706ae4d424ab9d4bbe40da4908467..305e9f77f6a2063ed23da29689f4de7d9bd53258 100644 (file)
@@ -533,7 +533,7 @@ class CRM_Contribute_Form_ContributionPage_Amount extends CRM_Contribute_Form_Co
     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';
index adcf39c5d7aa45f2865139a9bc5dc21aa72f9b5d..4fbe874a4929086e2330322578dc47787a1a07cb 100644 (file)
@@ -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 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'entity' => 'Event',
           'bao' => 'CRM_Event_BAO_Event',
           'localizable' => 0,
+          'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
           'html' => [
             'type' => 'Select',
           ],
index 1462a3697c73d1362e23150fda24ab68f864cf91..8271a4bfe13a51ca5b75d657eb64690025cab5e4 100644 (file)
@@ -541,7 +541,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent {
     }
 
     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';
index 9c08b4738bce0bd87e43ba515ec21c6f1bfa79f0..15bd5218edaa7012009a5c88d51e3c115f26e8f3 100644 (file)
@@ -80,6 +80,7 @@
     <name>payment_processor</name>
     <type>varchar</type>
     <length>128</length>
+    <serialize>SEPARATOR_TRIMMED</serialize>
     <comment>Payment Processors configured for this contribution Page</comment>
     <pseudoconstant>
       <table>civicrm_payment_processor</table>
index d4c9c65299dfa31b57f30e1687622fe03d3e2b7c..4c7e51143f850232f47754259c01d3885bc87b75 100644 (file)
     <name>payment_processor</name>
     <type>varchar</type>
     <length>128</length>
+    <serialize>SEPARATOR_TRIMMED</serialize>
     <comment>Payment Processors configured for this Event (if is_monetary is true)</comment>
     <pseudoconstant>
       <table>civicrm_payment_processor</table>