Merge pull request #18148 from civicrm/5.29
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 15 Aug 2020 01:27:52 +0000 (13:27 +1200)
committerGitHub <noreply@github.com>
Sat, 15 Aug 2020 01:27:52 +0000 (13:27 +1200)
5.29

207 files changed:
CRM/ACL/DAO/ACL.php
CRM/ACL/DAO/ACLCache.php
CRM/ACL/DAO/EntityRole.php
CRM/Activity/DAO/Activity.php
CRM/Activity/DAO/ActivityContact.php
CRM/Batch/DAO/Batch.php
CRM/Batch/DAO/EntityBatch.php
CRM/Campaign/DAO/Campaign.php
CRM/Campaign/DAO/CampaignGroup.php
CRM/Campaign/DAO/Survey.php
CRM/Campaign/Form/Campaign.php
CRM/Case/DAO/Case.php
CRM/Case/DAO/CaseActivity.php
CRM/Case/DAO/CaseContact.php
CRM/Case/DAO/CaseType.php
CRM/Case/Form/CaseView.php
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/ContactType.php
CRM/Contact/BAO/Query.php
CRM/Contact/DAO/ACLContactCache.php
CRM/Contact/DAO/Contact.php
CRM/Contact/DAO/ContactType.php
CRM/Contact/DAO/DashboardContact.php
CRM/Contact/DAO/Group.php
CRM/Contact/DAO/GroupContact.php
CRM/Contact/DAO/GroupContactCache.php
CRM/Contact/DAO/GroupNesting.php
CRM/Contact/DAO/GroupOrganization.php
CRM/Contact/DAO/Relationship.php
CRM/Contact/DAO/RelationshipCache.php
CRM/Contact/DAO/RelationshipType.php
CRM/Contact/DAO/SavedSearch.php
CRM/Contact/DAO/SubscriptionHistory.php
CRM/Contribute/DAO/Contribution.php
CRM/Contribute/DAO/ContributionPage.php
CRM/Contribute/DAO/ContributionProduct.php
CRM/Contribute/DAO/ContributionRecur.php
CRM/Contribute/DAO/ContributionSoft.php
CRM/Contribute/DAO/Premium.php
CRM/Contribute/DAO/PremiumsProduct.php
CRM/Contribute/DAO/Product.php
CRM/Contribute/DAO/Widget.php
CRM/Contribute/Form/ContributionPage/Amount.php
CRM/Core/CodeGen/DAO.php
CRM/Core/CodeGen/Specification.php
CRM/Core/CodeGen/Util/Template.php
CRM/Core/DAO.php
CRM/Core/DAO/ActionLog.php
CRM/Core/DAO/ActionMapping.php
CRM/Core/DAO/ActionSchedule.php
CRM/Core/DAO/Address.php
CRM/Core/DAO/AddressFormat.php
CRM/Core/DAO/Cache.php
CRM/Core/DAO/Component.php
CRM/Core/DAO/Country.php
CRM/Core/DAO/County.php
CRM/Core/DAO/CustomField.php
CRM/Core/DAO/CustomGroup.php
CRM/Core/DAO/Dashboard.php
CRM/Core/DAO/Discount.php
CRM/Core/DAO/Domain.php
CRM/Core/DAO/Email.php
CRM/Core/DAO/EntityFile.php
CRM/Core/DAO/EntityTag.php
CRM/Core/DAO/Extension.php
CRM/Core/DAO/File.php
CRM/Core/DAO/IM.php
CRM/Core/DAO/Job.php
CRM/Core/DAO/JobLog.php
CRM/Core/DAO/LocBlock.php
CRM/Core/DAO/LocationType.php
CRM/Core/DAO/Log.php
CRM/Core/DAO/MailSettings.php
CRM/Core/DAO/Managed.php
CRM/Core/DAO/Mapping.php
CRM/Core/DAO/MappingField.php
CRM/Core/DAO/Menu.php
CRM/Core/DAO/MessageTemplate.php
CRM/Core/DAO/Navigation.php
CRM/Core/DAO/Note.php
CRM/Core/DAO/OpenID.php
CRM/Core/DAO/OptionGroup.php
CRM/Core/DAO/OptionValue.php
CRM/Core/DAO/Phone.php
CRM/Core/DAO/PreferencesDate.php
CRM/Core/DAO/PrevNextCache.php
CRM/Core/DAO/PrintLabel.php
CRM/Core/DAO/RecurringEntity.php
CRM/Core/DAO/Setting.php
CRM/Core/DAO/StateProvince.php
CRM/Core/DAO/StatusPreference.php
CRM/Core/DAO/SystemLog.php
CRM/Core/DAO/Tag.php
CRM/Core/DAO/Timezone.php
CRM/Core/DAO/UFField.php
CRM/Core/DAO/UFGroup.php
CRM/Core/DAO/UFJoin.php
CRM/Core/DAO/UFMatch.php
CRM/Core/DAO/Website.php
CRM/Core/DAO/WordReplacement.php
CRM/Core/DAO/Worldregion.php
CRM/Core/Error.php
CRM/Core/PrevNextCache/Sql.php
CRM/Core/Region.php
CRM/Cxn/DAO/Cxn.php
CRM/Dedupe/DAO/Exception.php
CRM/Dedupe/DAO/Rule.php
CRM/Dedupe/DAO/RuleGroup.php
CRM/Event/Cart/DAO/Cart.php
CRM/Event/Cart/DAO/EventInCart.php
CRM/Event/DAO/Event.php
CRM/Event/DAO/Participant.php
CRM/Event/DAO/ParticipantPayment.php
CRM/Event/DAO/ParticipantStatusType.php
CRM/Event/Form/ManageEvent/Fee.php
CRM/Event/Form/Registration.php
CRM/Export/BAO/ExportProcessor.php
CRM/Financial/DAO/Currency.php
CRM/Financial/DAO/EntityFinancialAccount.php
CRM/Financial/DAO/EntityFinancialTrxn.php
CRM/Financial/DAO/FinancialAccount.php
CRM/Financial/DAO/FinancialItem.php
CRM/Financial/DAO/FinancialTrxn.php
CRM/Financial/DAO/FinancialType.php
CRM/Financial/DAO/PaymentProcessor.php
CRM/Financial/DAO/PaymentProcessorType.php
CRM/Financial/DAO/PaymentToken.php
CRM/Friend/DAO/Friend.php
CRM/Grant/DAO/Grant.php
CRM/Mailing/DAO/BouncePattern.php
CRM/Mailing/DAO/BounceType.php
CRM/Mailing/DAO/Mailing.php
CRM/Mailing/DAO/MailingAB.php
CRM/Mailing/DAO/MailingComponent.php
CRM/Mailing/DAO/MailingGroup.php
CRM/Mailing/DAO/MailingJob.php
CRM/Mailing/DAO/Recipients.php
CRM/Mailing/DAO/Spool.php
CRM/Mailing/DAO/TrackableURL.php
CRM/Mailing/Event/DAO/Bounce.php
CRM/Mailing/Event/DAO/Confirm.php
CRM/Mailing/Event/DAO/Delivered.php
CRM/Mailing/Event/DAO/Forward.php
CRM/Mailing/Event/DAO/Opened.php
CRM/Mailing/Event/DAO/Queue.php
CRM/Mailing/Event/DAO/Reply.php
CRM/Mailing/Event/DAO/Subscribe.php
CRM/Mailing/Event/DAO/TrackableURLOpen.php
CRM/Mailing/Event/DAO/Unsubscribe.php
CRM/Member/DAO/Membership.php
CRM/Member/DAO/MembershipBlock.php
CRM/Member/DAO/MembershipLog.php
CRM/Member/DAO/MembershipPayment.php
CRM/Member/DAO/MembershipStatus.php
CRM/Member/DAO/MembershipType.php
CRM/PCP/DAO/PCP.php
CRM/PCP/DAO/PCPBlock.php
CRM/Pledge/DAO/Pledge.php
CRM/Pledge/DAO/PledgeBlock.php
CRM/Pledge/DAO/PledgePayment.php
CRM/Price/DAO/LineItem.php
CRM/Price/DAO/PriceField.php
CRM/Price/DAO/PriceFieldValue.php
CRM/Price/DAO/PriceSet.php
CRM/Price/DAO/PriceSetEntity.php
CRM/Queue/DAO/QueueItem.php
CRM/Report/DAO/ReportInstance.php
CRM/Report/Form/Mailing/Summary.php
CRM/SMS/DAO/Provider.php
CRM/Upgrade/Form.php
CRM/Upgrade/Incremental/php/FiveThirty.php [new file with mode: 0644]
CRM/Upgrade/Incremental/sql/5.30.alpha1.mysql.tpl [new file with mode: 0644]
CRM/Utils/Check/Component.php
CRM/Utils/Check/Message.php
CRM/Utils/SQL.php
CRM/Utils/System.php
Civi/Api4/Generic/DAOGetAction.php
Civi/Api4/Generic/Traits/CustomValueActionTrait.php
ang/api4Explorer/Explorer.js
api/v3/utils.php
composer.json
composer.lock
ext/eventcart/CRM/Event/Cart/StateMachine/Checkout.php
sql/civicrm_generated.mysql
sql/test_data_second_domain.mysql
templates/CRM/Case/Form/CaseView.tpl
templates/CRM/Contribute/Form/Search/Common.tpl
templates/CRM/common/civicrm.settings.php.template
tests/phpunit/CRM/Contact/BAO/ContactType/ContactTypeTest.php
tests/phpunit/CRM/Core/DAOTest.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetTrait.php [new file with mode: 0644]
tests/phpunit/CRM/Export/BAO/ExportTest.php
tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php [new file with mode: 0644]
tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php
tests/phpunit/CRM/Utils/SQLTest.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
xml/schema/Batch/EntityBatch.xml
xml/schema/Contribute/Contribution.xml
xml/schema/Contribute/ContributionPage.xml
xml/schema/Core/Discount.xml
xml/schema/Core/EntityFile.xml
xml/schema/Core/EntityTag.xml
xml/schema/Core/Phone.xml
xml/schema/Event/Event.xml
xml/templates/dao.tpl
xml/version.xml

index df4002df2b74ea24d7a20847e3744663abc165bc..fa06cf96c5e2b4d421217ddb1cbfeab5b34ef913 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/ACL/ACL.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d91adfb9ffb0a514d42f6828f1b95033)
+ * (GenCodeChecksum:f75eaa0ee87675c14a224ec22b2c30a7)
  */
 
 /**
  * Database access object for the ACL entity.
  */
 class CRM_ACL_DAO_ACL extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.6';
 
   /**
    * Static instance to hold the table name.
index 9e7ede4882df4e32895c1cf7bfa0af98cb4db4d7..7e3ac8429f163e60b091c50dbd90983a661e5afc 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/ACL/ACLCache.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:0427e4f02009f7a66cf34ae18ef397aa)
+ * (GenCodeChecksum:cbf36d56ce734a5f7ceeb2071b68ebf8)
  */
 
 /**
  * Database access object for the ACLCache entity.
  */
 class CRM_ACL_DAO_ACLCache extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.6';
 
   /**
    * Static instance to hold the table name.
index 0afa11cd52c78f5baf2351dde426af509f12e5e4..9130d307ae4c3e1ea10b6bc2a382f48eb3525386 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/ACL/EntityRole.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:2e8133b4c385feaa934b2d14ea40f971)
+ * (GenCodeChecksum:d985c951ef9a8872008576b41c1f2b9c)
  */
 
 /**
  * Database access object for the EntityRole entity.
  */
 class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.6';
 
   /**
    * Static instance to hold the table name.
index 141c390fa4e1faf3fa76879b4bfa3300ecb6cfac..3221932f12eaaefaabbcecb70c42bcc32b376f86 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Activity/Activity.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:99193964db864f9ec91b02b2bbc2d8f4)
+ * (GenCodeChecksum:acbed5c46fa2f00de06493210358c684)
  */
 
 /**
  * Database access object for the Activity entity.
  */
 class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index f7bd52c8e50ee0b441d2ab060efc03b14a6e3ff2..61676f395b5f4f890305e51fdb8304fe70d48f02 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Activity/ActivityContact.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b458f04c2195968dbc9d49f35f7abb70)
+ * (GenCodeChecksum:777598f3625dfeaf37a81de282808c60)
  */
 
 /**
  * Database access object for the ActivityContact entity.
  */
 class CRM_Activity_DAO_ActivityContact extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.4';
 
   /**
    * Static instance to hold the table name.
index 995e7cd9617ba7b6713d1e37909673e56e7f420e..f2571b674f8361eb9a1e159e5e11bf42da969857 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Batch/Batch.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:062be2c63f724430f3a380c015fd6a02)
+ * (GenCodeChecksum:8169fc2f338afc4a163214c0018030be)
  */
 
 /**
  * Database access object for the Batch entity.
  */
 class CRM_Batch_DAO_Batch extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.3';
 
   /**
    * Static instance to hold the table name.
index 3bffdf0ada9807f935bd956f92dcf75050b3f1c6..6c697fb37073e0571bf4f1ca832bb11e512157dd 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Batch/EntityBatch.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:645843a03d3f8e9194ddd2bd79abf5c7)
+ * (GenCodeChecksum:6b6bd1337d9011c2a262de0e62c1e8e1)
  */
 
 /**
  * Database access object for the EntityBatch entity.
  */
 class CRM_Batch_DAO_EntityBatch extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.3';
 
   /**
    * Static instance to hold the table name.
index 44b832de2161b8260693a54501037aeba9f2205a..742996a6bde2c84ddbd4e249d59b731576110a99 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Campaign/Campaign.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6b53e3fb452807fce31fc81bb2b09b38)
+ * (GenCodeChecksum:cfa77579eb9b91b31b6c5618b52c6e87)
  */
 
 /**
  * Database access object for the Campaign entity.
  */
 class CRM_Campaign_DAO_Campaign extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.3';
 
   /**
    * Static instance to hold the table name.
index 4dbb8b7f2d1dad664c1bba8836ba97c3b81fff9d..97d4abd5af1839b7b5a9c66f77eee82ca61cb31f 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Campaign/CampaignGroup.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a4fa6a19ef72119a316417521e209cd4)
+ * (GenCodeChecksum:74c02a4708ef706860d023c1635b98c4)
  */
 
 /**
  * Database access object for the CampaignGroup entity.
  */
 class CRM_Campaign_DAO_CampaignGroup extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.3';
 
   /**
    * Static instance to hold the table name.
index 62493531bf813079172122bc457d8bcdbf43b561..9c9626b6be8c714478feddfedc7d36e85ca458f4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Campaign/Survey.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:80b92f90300f8e432ddd68e95d22b622)
+ * (GenCodeChecksum:e955546c8081852591bc08b1fdee4213)
  */
 
 /**
  * Database access object for the Survey entity.
  */
 class CRM_Campaign_DAO_Survey extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.2';
 
   /**
    * Static instance to hold the table name.
index 509b1278f45abbcbb61bcbcd487d43a398b8b364..b47cee77e72bb0c2755967c10b519a853ef44c02 100644 (file)
@@ -222,7 +222,7 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
     $this->add('wysiwyg', 'goal_general', ts('Campaign Goals'), ['rows' => 2, 'cols' => 40]);
     $this->add('text', 'goal_revenue', ts('Revenue Goal'), ['size' => 8, 'maxlength' => 12]);
     $this->addRule('goal_revenue', ts('Please enter a valid money value (e.g. %1).',
-      [1 => CRM_Utils_Money::format('99.99', ' ')]
+      [1 => CRM_Utils_Money::formatLocaleNumericRoundedForDefaultCurrency(99.99)]
     ), 'money');
 
     // is this Campaign active
index 8f54a68d23d2117de2597ce1a84e59344f6f8e0e..946c992f4b6a509042b4d72c8d0387ff82a23fc4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Case/Case.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ec6804103883c17fff63061e06d3e591)
+ * (GenCodeChecksum:8b18140da75bbf971a143c205f2af1cd)
  */
 
 /**
  * Database access object for the Case entity.
  */
 class CRM_Case_DAO_Case extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index a57d2a9bd1f7bb1b8022315557d2da43c7ecd26a..9efe7b4af3e553cc554516347cdc9e0899f848ad 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Case/CaseActivity.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d2ef4c48307f130ba531ff5c4bfb38d6)
+ * (GenCodeChecksum:974d18e84d3416c98293bedd66c3384c)
  */
 
 /**
  * Database access object for the CaseActivity entity.
  */
 class CRM_Case_DAO_CaseActivity extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index df46165d1500b7733aea1b05d3d7d43a9bfaa0e5..788b1e58f94810e78b6e6978c1b21fff9b038adc 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Case/CaseContact.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4a71399455a593008da4849db726f7b9)
+ * (GenCodeChecksum:b315f42d7c886c123c9e87c9713c4911)
  */
 
 /**
  * Database access object for the CaseContact entity.
  */
 class CRM_Case_DAO_CaseContact extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.1';
 
   /**
    * Static instance to hold the table name.
index 039a9582440f0efccb1a6268ba037e2566f77707..dbafcb30a8dbcafeaa5a72f5ee7ceddbcba93f0b 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Case/CaseType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c65e3b1aa03fb9ad3122915d612fefb8)
+ * (GenCodeChecksum:cde81a56b0e8201eac521b92ded6fb45)
  */
 
 /**
  * Database access object for the CaseType entity.
  */
 class CRM_Case_DAO_CaseType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.5';
 
   /**
    * Static instance to hold the table name.
index 4c21b837e1c187beade765b2482c5132e68744e2..f2300dadb23e11ae16d1cd37e48ea083b48aa6de 100644 (file)
@@ -272,6 +272,9 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
         ['class' => 'crm-select2 crm-action-menu fa-list-ol']
       );
     }
+    // This button is hidden but gets clicked by javascript at
+    // https://github.com/civicrm/civicrm-core/blob/bd28ecf8121a85bc069cad3ab912a0c3dff8fdc5/templates/CRM/Case/Form/CaseView.js#L194
+    // by the onChange handler for the above timeline_id select.
     $this->addElement('xbutton', $this->getButtonName('next'), ' ', [
       'class' => 'hiddenElement',
       'type' => 'submit',
@@ -520,6 +523,9 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
         FALSE,
         ['class' => 'crm-select2 huge']
       );
+      // This button is hidden but gets clicked by javascript at
+      // https://github.com/civicrm/civicrm-core/blob/bd28ecf8121a85bc069cad3ab912a0c3dff8fdc5/templates/CRM/Case/Form/CaseView.js#L55
+      // when the mergeCasesDialog is saved.
       $this->addElement('xbutton',
         $this->getButtonName('next', 'merge_case'),
         ts('Merge'),
index 6a105253d665f68107de1880df9d89d613b19ada..29c82bd90095a51272ad27253560f6da37b7d506 100644 (file)
@@ -1562,9 +1562,13 @@ WHERE     civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
           ],
         ];
 
+        $phoneFields = CRM_Core_DAO_Phone::export();
+        // This adds phone_type to the exportable fields and make it available for export.
+        // with testing the same can be done to the other entities.
+        CRM_Core_DAO::appendPseudoConstantsToFields($phoneFields);
         $locationFields = array_merge($locationType,
           CRM_Core_DAO_Address::export(),
-          CRM_Core_DAO_Phone::export(),
+          $phoneFields,
           CRM_Core_DAO_Email::export(),
           $IMProvider,
           CRM_Core_DAO_IM::export(TRUE),
index 4284efa467c118c03dc8eac2e2887a8030f6fe0e..18b62ab86e1d26007865ed65a5ce15ad17d3dbe7 100644 (file)
@@ -45,9 +45,11 @@ class CRM_Contact_BAO_ContactType extends CRM_Contact_DAO_ContactType {
    * @param string $contactType
    *
    * @return bool
+   *
+   * @throws \API_Exception
    */
   public static function isActive($contactType) {
-    $contact = self::contactTypeInfo(FALSE);
+    $contact = self::contactTypeInfo();
     return array_key_exists($contactType, $contact);
   }
 
@@ -113,51 +115,25 @@ class CRM_Contact_BAO_ContactType extends CRM_Contact_DAO_ContactType {
   /**
    * Retrieve all subtypes Information.
    *
-   * @todo - call getAllContactTypes & return filtered results.
-   *
    * @param array $contactType
-   *   ..
    * @param bool $all
-   * @param bool $ignoreCache
    *
    * @return array
-   *   Array of sub type information
+   *   Array of sub type information, subset of getAllContactTypes.
+   *
+   * @throws \API_Exception
    */
-  public static function subTypeInfo($contactType = NULL, $all = FALSE, $ignoreCache = FALSE) {
-    $argString = $all ? 'CRM_CT_STI_1_' : 'CRM_CT_STI_0_';
-    if (!empty($contactType)) {
-      $contactType = (array) $contactType;
-      $argString .= implode('_', $contactType);
-    }
-    if (!Civi::cache('contactTypes')->has($argString) || $ignoreCache) {
-      $ctWHERE = '';
-      if (!empty($contactType)) {
-        $ctWHERE = " AND parent.name IN ('" . implode("','", $contactType) . "')";
-      }
-
-      $sql = "
-SELECT subtype.*, parent.name as parent, parent.label as parent_label
-FROM   civicrm_contact_type subtype
-INNER JOIN civicrm_contact_type parent ON subtype.parent_id = parent.id
-WHERE  subtype.name IS NOT NULL AND subtype.parent_id IS NOT NULL {$ctWHERE}
-";
-      if ($all === FALSE) {
-        $sql .= " AND subtype.is_active = 1 AND parent.is_active = 1 ORDER BY parent.id";
-      }
-      $dao = CRM_Core_DAO::executeQuery($sql, [],
-        FALSE, 'CRM_Contact_DAO_ContactType'
-      );
-      $values = [];
-      while ($dao->fetch()) {
-        $value = [];
-        CRM_Core_DAO::storeValues($dao, $value);
-        $value['parent'] = $dao->parent;
-        $value['parent_label'] = $dao->parent_label;
-        $values[$dao->name] = $value;
+  public static function subTypeInfo($contactType = NULL, $all = FALSE) {
+    $contactTypes = self::getAllContactTypes();
+    foreach ($contactTypes as $index => $type) {
+      if (empty($type['parent']) ||
+        (!$all && !$type['is_active'])
+        || ($contactType && $type['parent'] !== $contactType)
+      ) {
+        unset($contactTypes[$index]);
       }
-      Civi::cache('contactTypes')->set($argString, $values);
     }
-    return Civi::cache('contactTypes')->get($argString);
+    return $contactTypes;
   }
 
   /**
@@ -173,6 +149,7 @@ WHERE  subtype.name IS NOT NULL AND subtype.parent_id IS NOT NULL {$ctWHERE}
    * @return array
    *   all subtypes OR list of subtypes associated to
    *   a given basic contact type
+   * @throws \API_Exception
    */
   public static function subTypes($contactType = NULL, $all = FALSE, $columnName = 'name', $ignoreCache = FALSE) {
     if ($columnName === 'name') {
index a6b2545d8bfc72265a4d1feaa3992befbc5771c6..1b707301d1e91fbb402764226cb39ed1a55d8e2f 100644 (file)
@@ -1121,6 +1121,9 @@ class CRM_Contact_BAO_Query {
         }
 
         $field = $this->_fields[$elementName] ?? NULL;
+        if (isset($this->_pseudoConstantsSelect[$field['name']])) {
+          $this->_pseudoConstantsSelect[$name . '-' . $field['name']] = $this->_pseudoConstantsSelect[$field['name']];
+        }
 
         // hack for profile, add location id
         if (!$field) {
index b1bf5bdd03645f913e4a6639a149df48d81464e9..6b319f9636ce77e248b306c203b4f9451a161a5a 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/ACLContactCache.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b99253b18e66856d4b6d914f2669fa30)
+ * (GenCodeChecksum:97d9be5e13ece64b6c9ad1722d9bca68)
  */
 
 /**
  * Database access object for the ACLContactCache entity.
  */
 class CRM_Contact_DAO_ACLContactCache extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.1';
 
   /**
    * Static instance to hold the table name.
index 08668b27399710d9e094cf89331f237ad363639e..f5836720f26f259e110b7160cda11b49d45a6a6b 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/Contact.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:da59563e28c0229228f7c2baa20caabf)
+ * (GenCodeChecksum:254705f91b182cf2ded06a3caf578f6e)
  */
 
 /**
  * Database access object for the Contact entity.
  */
 class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 0237e0943dea7f0055c0ad7abd1f11af8b83c05d..41d8b878036906d1e0e34153eaefbde39dfc34a6 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/ContactType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:34f2ee23181ddce3050484b6e30b0e72)
+ * (GenCodeChecksum:0f7546e10f09f7637d50f7a34c632cb5)
  */
 
 /**
  * Database access object for the ContactType entity.
  */
 class CRM_Contact_DAO_ContactType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.1';
 
   /**
    * Static instance to hold the table name.
index 360c5caf71d43a8fdcc0af811ffd331a825981a6..16c0b3b593796c93f952a45700125efe91740eaa 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/DashboardContact.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c6084fad33e2fed9634eee46cfcfd4ee)
+ * (GenCodeChecksum:67153c09e74eda2febf15986f9c04439)
  */
 
 /**
  * Database access object for the DashboardContact entity.
  */
 class CRM_Contact_DAO_DashboardContact extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.1';
 
   /**
    * Static instance to hold the table name.
index 3c051ec4f49442505966446c8f6f54a0f2b66981..cdae401986356649bb6561599060cea33203d5e1 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/Group.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a8a3812a392b7544441cdbe1f9500f21)
+ * (GenCodeChecksum:6a2a222c5fa5b461727bb95379723b08)
  */
 
 /**
  * Database access object for the Group entity.
  */
 class CRM_Contact_DAO_Group extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 0605b3a09f0e941234ac67eebfe0fcd855a9b3a4..52c66fd638c930609b4d353de13d309c20b7612d 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/GroupContact.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:11947c2ac6a20781c2daa15b0f894983)
+ * (GenCodeChecksum:143ba4d95cae73fc81c8e932970cbc1f)
  */
 
 /**
  * Database access object for the GroupContact entity.
  */
 class CRM_Contact_DAO_GroupContact extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 19c2f738cf3c9313df5478a267ac14ab0d1295f0..3ee02aa7e2097f2ab0801e4452706d194b555b11 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/GroupContactCache.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:78446b0939b21d995dd17476d11030e7)
+ * (GenCodeChecksum:a169b776ec9bfc8864a05750d4ae6b95)
  */
 
 /**
  * Database access object for the GroupContactCache entity.
  */
 class CRM_Contact_DAO_GroupContactCache extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.1';
 
   /**
    * Static instance to hold the table name.
index 2f6a61b8f5e129fc08e261717ab675196ea2e0ba..90624a6e98fdb749120d4626376b6d438ead8716 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/GroupNesting.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:7e5dfd763c2f4b39ff7f3ea962269bae)
+ * (GenCodeChecksum:0ca7da77b0229b439c9c3a4c4c2e4326)
  */
 
 /**
  * Database access object for the GroupNesting entity.
  */
 class CRM_Contact_DAO_GroupNesting extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index 49f1bd8616e46608fdb84da2acda026adc917107..407ea31d83f505e3f82cbe9c0c2f7fa273f8c6bd 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/GroupOrganization.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:59e2d9b6cb5577d3f8a72422fb33f643)
+ * (GenCodeChecksum:dfe8edf8f786790af95f09f456d1cbe7)
  */
 
 /**
  * Database access object for the GroupOrganization entity.
  */
 class CRM_Contact_DAO_GroupOrganization extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index 5110814fe3c2d0955a7aab7029a79f07662c954c..14b10a52802e77892254edd2063d4583955aaac6 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/Relationship.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b1e83f9c102db77881c4b9c730f38337)
+ * (GenCodeChecksum:25faea8225f483ae95cf29af08a8542d)
  */
 
 /**
  * Database access object for the Relationship entity.
  */
 class CRM_Contact_DAO_Relationship extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index ddb541bb70277782d78e1d1712f5c2273111f9e8..cfa5a75bc2e0ec936dd9198202d1190c36cef8e6 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/RelationshipCache.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d511533f30d5d2d8deac82664a6288d1)
+ * (GenCodeChecksum:b40781c15c3351a766a6083522f0e5e4)
  */
 
 /**
  * Database access object for the RelationshipCache entity.
  */
 class CRM_Contact_DAO_RelationshipCache extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '5.29';
 
   /**
    * Static instance to hold the table name.
index 06ec7aff101aac07bcfc13feac8c14e07e5f3943..e703e2fe849b78e5065561a73fa2e65504b74f88 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/RelationshipType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:205fa87e1f397fbf810ffbbd74c1853a)
+ * (GenCodeChecksum:6e9767fcd0fc6eba8fcd408588fe0755)
  */
 
 /**
  * Database access object for the RelationshipType entity.
  */
 class CRM_Contact_DAO_RelationshipType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 0d3dcbbedd00e0bb963abc455a522b5fab111a8a..a5fb2d460375d06c57bd1bcc742f8c05b9643cc4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/SavedSearch.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4093fd1cfa684e54d609528d8df160ca)
+ * (GenCodeChecksum:4b2f292a8196a5dc4a73afc078cd11cb)
  */
 
 /**
  * Database access object for the SavedSearch entity.
  */
 class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index d476dd3ebb88c6cc60775b812162d5ec15f662bd..421ea3381555f30664b05db8bf3b608b8874a1f4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contact/SubscriptionHistory.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4aa1411720f09f9ad8e2feb2a8d2a833)
+ * (GenCodeChecksum:7c033b0631f14da30172883b14686574)
  */
 
 /**
  * Database access object for the SubscriptionHistory entity.
  */
 class CRM_Contact_DAO_SubscriptionHistory extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index e64cf1675e0bcaa1c132bf5182abc7deae1486f9..d40a175b96d7ab4c6f73b56fe5121a0c1cbc0a3d 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/Contribution.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:5e4c6a77803e361625cafbd2f6e58bbe)
+ * (GenCodeChecksum:534963bc67ddc36a182ff4767f223531)
  */
 
 /**
  * Database access object for the Contribution entity.
  */
 class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.3';
 
   /**
    * Static instance to hold the table name.
@@ -359,6 +361,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
           'html' => [
             'type' => 'Select',
+            'label' => ts("Contribution Page"),
           ],
           'pseudoconstant' => [
             'table' => 'civicrm_contribution_page',
index 7970a2907f992564ca7e2f2fa35c7833461eef97..91ad8165cf80b5363a0490222d27cb350f95dc6b 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/ContributionPage.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:63bc96be1f5552249e75545940c13bed)
+ * (GenCodeChecksum:f12a7fabc2ed417166aeeefbdd596fb2)
  */
 
 /**
  * Database access object for the ContributionPage entity.
  */
 class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.3';
 
   /**
    * Static instance to hold the table name.
@@ -467,6 +469,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 cebd77a3fbf76ca4e75f4c6ca36266d66cf4e743..e5a0f053702abd27b6be9e7f4abc20a0cd49b8e1 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/ContributionProduct.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:dd95e7a994c6dfe314f149b5ba7d48db)
+ * (GenCodeChecksum:4e76d9dc75f5bc1b1141645c8ee5e2e4)
  */
 
 /**
  * Database access object for the ContributionProduct entity.
  */
 class CRM_Contribute_DAO_ContributionProduct extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.4';
 
   /**
    * Static instance to hold the table name.
index a3254572ca08522ad7db4093c632556a91cdd683..2ccd7486d6c3dd11f3920b8dc1b7f48c6fe91d12 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/ContributionRecur.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:62019becf87dee13b7e9e174eb3c286e)
+ * (GenCodeChecksum:decf43c002d0e4ded0fe5f2a2e2f7bd0)
  */
 
 /**
  * Database access object for the ContributionRecur entity.
  */
 class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.6';
 
   /**
    * Static instance to hold the table name.
index ba2c9e21c3a88ad175c1f23861e0b40e4c0f0ca6..3a1a9b7af7609c05af4aa5179fc6cb8151f185bd 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/ContributionSoft.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a1c2918874b74f3f9bbbe0464aea1563)
+ * (GenCodeChecksum:caa58722ef865c7342fdff08f24d86ee)
  */
 
 /**
  * Database access object for the ContributionSoft entity.
  */
 class CRM_Contribute_DAO_ContributionSoft extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.2';
 
   /**
    * Static instance to hold the table name.
index a6ef8403508b4dc9b896194012db76b26cef07d2..7e0020c134926741b9c068a8c73681af624ab722 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/Premium.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:df0bfae4e0916c02a621471db14f3151)
+ * (GenCodeChecksum:cd1826e777cea80450636ef175aaab7f)
  */
 
 /**
  * Database access object for the Premium entity.
  */
 class CRM_Contribute_DAO_Premium extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.4';
 
   /**
    * Static instance to hold the table name.
index 79d9071c30c171892afa85c895249a7b6c2b8133..b153adb274962e9a89de5b1789fe607092cdde9d 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/PremiumsProduct.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a250114a018b2fd5e9d259f00d18a5c3)
+ * (GenCodeChecksum:4831cb4c7e0611db0f4312f6522d2c20)
  */
 
 /**
  * Database access object for the PremiumsProduct entity.
  */
 class CRM_Contribute_DAO_PremiumsProduct extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.4';
 
   /**
    * Static instance to hold the table name.
index 5632c65d4335c7f180744a5fb87cea72869dc1b4..8433e1820ad0ee4b6982f5b79413d5725ae82ddc 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/Product.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6e0a8b319985de1fe01120f4d91003a8)
+ * (GenCodeChecksum:dea1c7db61776456a70f752fe9f93f06)
  */
 
 /**
  * Database access object for the Product entity.
  */
 class CRM_Contribute_DAO_Product extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.4';
 
   /**
    * Static instance to hold the table name.
index 116d447ed53148c8dfc7e96ff2b81ff9a0ba16c6..5da47438da53eebf0e55504fd27d37a6cc5d7a05 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/Widget.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b0e7180701d83e1d83d53bf2e43c0c51)
+ * (GenCodeChecksum:e24eaf675b793969d408fbc0f847a9ed)
  */
 
 /**
  * Database access object for the Widget entity.
  */
 class CRM_Contribute_DAO_Widget extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index b90b5ea054f706ae4d424ab9d4bbe40da4908467..890210353923bae794a3dce2cd6e152172cba3f8 100644 (file)
@@ -366,7 +366,7 @@ class CRM_Contribute_Form_ContributionPage_Amount extends CRM_Contribute_Form_Co
       }
     }
     else {
-      if ($fields['amount_block_is_active'] && empty($fields['payment_processor'])) {
+      if (!empty($fields['amount_block_is_active']) && empty($fields['payment_processor'])) {
         $errors['payment_processor'] = ts('You have listed fixed contribution options or selected a price set, but no payment option has been selected. Please select at least one payment processor and/or enable the pay later option.');
       }
     }
@@ -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 69cc8d0e479ac4d59b5479f9e01fb027ca1f8111..9865d9e5f8be8dee6d1c11a6b67cfde800a8988c 100644 (file)
@@ -26,6 +26,10 @@ class CRM_Core_CodeGen_DAO extends CRM_Core_CodeGen_BaseTask {
    */
   private $tsFunctionName;
 
+  private $useHelper = '';
+
+  private $ext = "'civicrm'";
+
   /**
    * CRM_Core_CodeGen_DAO constructor.
    *
@@ -37,6 +41,12 @@ class CRM_Core_CodeGen_DAO extends CRM_Core_CodeGen_BaseTask {
     parent::__construct($config);
     $this->name = $name;
     $this->tsFunctionName = $tsFunctionName;
+    // If this DAO belongs to an extension, add `use` statement and define EXT constant.
+    if (strpos($tsFunctionName, '::ts')) {
+      $this->tsFunctionName = 'E::ts';
+      $this->useHelper = 'use \\' . explode('::', $tsFunctionName)[0] . ' as E;';
+      $this->ext = 'E::LONG_NAME';
+    }
   }
 
   /**
@@ -68,16 +78,8 @@ class CRM_Core_CodeGen_DAO extends CRM_Core_CodeGen_BaseTask {
       return;
     }
 
-    $template = new CRM_Core_CodeGen_Util_Template('php');
-    $template->assign('table', $this->tables[$this->name]);
-    if (empty($this->tables[$this->name]['index'])) {
-      $template->assign('indicesPhp', var_export([], 1));
-    }
-    else {
-      $template->assign('indicesPhp', var_export($this->tables[$this->name]['index'], 1));
-    }
+    $template = $this->getTemplate();
     $template->assign('genCodeChecksum', $this->getTableChecksum());
-    $template->assign('tsFunctionName', $this->tsFunctionName);
     $template->run('dao.tpl', $this->getAbsFileName());
   }
 
@@ -88,21 +90,31 @@ class CRM_Core_CodeGen_DAO extends CRM_Core_CodeGen_BaseTask {
    */
   public function getRaw() {
     if (!$this->raw) {
-      $template = new CRM_Core_CodeGen_Util_Template('php');
-      $template->assign('table', $this->tables[$this->name]);
-      if (empty($this->tables[$this->name]['index'])) {
-        $template->assign('indicesPhp', var_export([], 1));
-      }
-      else {
-        $template->assign('indicesPhp', var_export($this->tables[$this->name]['index'], 1));
-      }
+      $template = $this->getTemplate();
       $template->assign('genCodeChecksum', 'NEW');
-      $template->assign('tsFunctionName', $this->tsFunctionName);
       $this->raw = $template->fetch('dao.tpl');
     }
     return $this->raw;
   }
 
+  /**
+   * @return CRM_Core_CodeGen_Util_Template
+   */
+  private function getTemplate() {
+    $template = new CRM_Core_CodeGen_Util_Template('php');
+    $template->assign('table', $this->tables[$this->name]);
+    if (empty($this->tables[$this->name]['index'])) {
+      $template->assign('indicesPhp', var_export([], 1));
+    }
+    else {
+      $template->assign('indicesPhp', var_export($this->tables[$this->name]['index'], 1));
+    }
+    $template->assign('tsFunctionName', $this->tsFunctionName);
+    $template->assign('ext', $this->ext);
+    $template->assign('useHelper', $this->useHelper);
+    return $template;
+  }
+
   /**
    * Get relative file name.
    *
index 0f4678d74acde15fe778eb0305bcd17b30471d37..4d2be52ad41a80a166a0a7e479ab6de497f6e767 100644 (file)
@@ -212,6 +212,7 @@ class CRM_Core_CodeGen_Specification {
       'objectName' => $klass,
       'title' => $tableXML->title ?? self::nameToTitle($klass),
       'icon' => $tableXML->icon ?? NULL,
+      'add' => $tableXML->add ?? NULL,
       'labelName' => substr($name, 8),
       'className' => $this->classNames[$name],
       'bao' => ($useBao ? str_replace('DAO', 'BAO', $this->classNames[$name]) : $this->classNames[$name]),
index ee0e09bd4baca3eab3ba6b010b9645a9c7abfab3..5febab786d75beff796a82725c290586d3913dd4 100644 (file)
@@ -78,6 +78,7 @@ class CRM_Core_CodeGen_Util_Template {
         '=> true,' => '=> TRUE,',
         '=> false,' => '=> FALSE,',
         'static ::' => 'static::',
+        'use\\' => 'use \\',
       ];
       $contents = str_replace(array_keys($replacements), array_values($replacements), $contents);
       $contents = preg_replace('#(\s*)\\/\\*\\*#', "\n\$1/**", $contents);
index a1cd6f7498915e29b1919cb62dd88662533a633a..2d3ce654cec8a8fc2500f95be2fc90cc3fe95267 100644 (file)
@@ -163,7 +163,7 @@ class CRM_Core_DAO extends DB_DataObject {
     $options = &PEAR::getStaticProperty('DB_DataObject', 'options');
     $options['database'] = $dsn;
     $options['quote_identifiers'] = TRUE;
-    if (self::isSSLDSN($dsn)) {
+    if (CRM_Utils_SQL::isSSLDSN($dsn)) {
       // There are two different options arrays.
       $other_options = &PEAR::getStaticProperty('DB', 'options');
       $other_options['ssl'] = TRUE;
@@ -552,7 +552,8 @@ class CRM_Core_DAO extends DB_DataObject {
 
     // Exclude fields yet not added by pending upgrades
     $dbVer = \CRM_Core_BAO_Domain::version();
-    if ($fields && version_compare($dbVer, \CRM_Utils_System::version()) < 0) {
+    $daoExt = defined(static::class . '::EXT') ? constant(static::class . '::EXT') : NULL;
+    if ($fields && $daoExt === 'civicrm' && version_compare($dbVer, \CRM_Utils_System::version()) < 0) {
       $fields = array_filter($fields, function($field) use ($dbVer) {
         $add = $field['add'] ?? '1.0.0';
         if (substr_count($add, '.') < 2) {
@@ -1148,6 +1149,23 @@ class CRM_Core_DAO extends DB_DataObject {
     return $result;
   }
 
+  /**
+   * Checks if this DAO's table ought to exist.
+   *
+   * If there are pending DB updates, this function compares the CiviCRM version of the table to the current schema version.
+   *
+   * @return bool
+   * @throws CRM_Core_Exception
+   */
+  public static function tableHasBeenAdded() {
+    if (CRM_Utils_System::version() === CRM_Core_BAO_Domain::version()) {
+      return TRUE;
+    }
+    $daoExt = defined(static::class . '::EXT') ? constant(static::class . '::EXT') : NULL;
+    $daoVersion = defined(static::class . '::TABLE_ADDED') ? constant(static::class . '::TABLE_ADDED') : '1.0';
+    return !($daoExt === 'civicrm' && version_compare(CRM_Core_BAO_Domain::version(), $daoVersion, '<'));
+  }
+
   /**
    * Check if there is a given table in the database.
    *
@@ -1181,15 +1199,12 @@ LIKE %1
 
   /**
    * @param $version
-   *
+   * @deprecated
    * @return bool
    */
   public function checkVersion($version) {
-    $query = "
-SELECT version
-FROM   civicrm_domain
-";
-    $dbVersion = CRM_Core_DAO::singleValueQuery($query);
+    CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_BAO_Domain::version');
+    $dbVersion = CRM_Core_BAO_Domain::version();
     return trim($version) == trim($dbVersion);
   }
 
@@ -1524,6 +1539,7 @@ FROM   civicrm_domain
     }
 
     if ($trapException) {
+      CRM_Core_Error::deprecatedFunctionWarning('calling functions should handle exceptions');
       $errorScope = CRM_Core_TemporaryErrorScope::ignoreException();
     }
 
@@ -1539,6 +1555,7 @@ FROM   civicrm_domain
     }
 
     if (is_a($result, 'DB_Error')) {
+      CRM_Core_Error::deprecatedFunctionWarning('calling functions should handle exceptions');
       return $result;
     }
 
@@ -3111,21 +3128,4 @@ SELECT contact_id
     }
   }
 
-  /**
-   * Does the DSN indicate the connection should use ssl.
-   *
-   * @param string $dsn
-   *
-   * @return bool
-   */
-  public static function isSSLDSN(string $dsn):bool {
-    // Note that ssl= below is not an official PEAR::DB option. It doesn't know
-    // what to do with it. We made it up because it's not required
-    // to have client-side certificates to use ssl, so here you can specify
-    // you want that by putting ssl=1 in the DSN string.
-    //
-    // Cast to bool in case of error which we interpret as no ssl.
-    return (bool) preg_match('/[\?&](key|cert|ca|capath|cipher|ssl)=/', $dsn);
-  }
-
 }
index b4399596f4a1d998cae1d6918e92ef8d6104bb0b..f725a2558a186451449ae1ba0461a6e334d51646 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/ActionLog.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:1cc48318ce597a6cac7ff0e2a4518ff5)
+ * (GenCodeChecksum:2ccef6f7cc6a43d833301e93a2a0d61f)
  */
 
 /**
  * Database access object for the ActionLog entity.
  */
 class CRM_Core_DAO_ActionLog extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.4';
 
   /**
    * Static instance to hold the table name.
index 95f2c276ab78d36c4edc13e788298d552c97c0a8..8a61ce5bbc492cc9bfe0792b2e3fd10d088a0ef9 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/ActionMapping.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:be879c0936430ca0cebf0c8bf1c3dc7a)
+ * (GenCodeChecksum:037a3f26719a4774957814f28c499e60)
  */
 
 /**
  * Database access object for the ActionMapping entity.
  */
 class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.4';
 
   /**
    * Static instance to hold the table name.
index 6ac11664116c050a4a2f958214c9e5b5354e8ed5..2762cb3f888584dff9ac5207afec74337e68c08b 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/ActionSchedule.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4493f5d18b2b452d4a6b9ee4e15a15bf)
+ * (GenCodeChecksum:caf8b2cabbe06570dcf6cb93144004d2)
  */
 
 /**
  * Database access object for the ActionSchedule entity.
  */
 class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.4';
 
   /**
    * Static instance to hold the table name.
index f74252f6e24e9caebf26140916e0dc9e0ff10064..7151847db2f9c41fe4745643fc994f2bf2180648 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Address.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8dc9868de21595676938b96deb836379)
+ * (GenCodeChecksum:a6b8f21dd3839de1ce1273e0910f0c8c)
  */
 
 /**
  * Database access object for the Address entity.
  */
 class CRM_Core_DAO_Address extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 436733d4bcacb17f1e1b13c73b6b3f83db5298b5..762b90b6a177136e61d4353dd7e0fb57a35f0251 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/AddressFormat.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:bd005804e8f957b74c4eafacea35792d)
+ * (GenCodeChecksum:1ce11647576d05acfc364969eddfcce4)
  */
 
 /**
  * Database access object for the AddressFormat entity.
  */
 class CRM_Core_DAO_AddressFormat extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.2';
 
   /**
    * Static instance to hold the table name.
index 71704bd66a00669c65dd74454a828a83dbde9708..01bc33ea91c53c34348d14bf780e11976cf54ed2 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Cache.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:695d7ebea0e7103ff58dfbbff111dde6)
+ * (GenCodeChecksum:af1401f844c699c6ad35366a32a8db03)
  */
 
 /**
  * Database access object for the Cache entity.
  */
 class CRM_Core_DAO_Cache extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.1';
 
   /**
    * Static instance to hold the table name.
index bcc2c8008a6ddfafc839d2e52c48177d77011828..f9b7b077f9ad6a15942caa88643cf4fe129c9962 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Component.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:1f7be99fb2d2adfebdf3faa2013666f4)
+ * (GenCodeChecksum:6c3fd2c8e875746c0ceffa499624f77c)
  */
 
 /**
  * Database access object for the Component entity.
  */
 class CRM_Core_DAO_Component extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index eb77528b78f5d277e2543ec99e58edd05131dc5a..24d458b99cef0c31da41f71899cfa516e5b50612 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Country.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d40139ce11551ce445103a7fe9d3d46e)
+ * (GenCodeChecksum:cdd80b394924586274cf4b91183d3637)
  */
 
 /**
  * Database access object for the Country entity.
  */
 class CRM_Core_DAO_Country extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 38167c8050444a8dcba91f04f60de3fd31dcbf62..97d2fae58ea13c74485b2ab7c3547072d5095648 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/County.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:095ad13ad08bd1d3c12be5094239df32)
+ * (GenCodeChecksum:96f94dbbafff9a4e1f0ff276799fcbbd)
  */
 
 /**
  * Database access object for the County entity.
  */
 class CRM_Core_DAO_County extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 624a00f48470c64c3affa090374c394064589bef..137fbf81a247caf18412772428856602a4df5ac5 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/CustomField.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:7bdf73d78bf9965895218895184e40a9)
+ * (GenCodeChecksum:200b28277fc9e025b42d3f3e45fde020)
  */
 
 /**
  * Database access object for the CustomField entity.
  */
 class CRM_Core_DAO_CustomField extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 8d38cd71d53e5c1fc21c6a095f6002a93b1b8688..12dd47769ebcc12105696d1b50de33d0fe7be493 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/CustomGroup.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4f58c488f8213dab928db357bc88f478)
+ * (GenCodeChecksum:494d883be861157d8067e6a6c50c23f6)
  */
 
 /**
  * Database access object for the CustomGroup entity.
  */
 class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index a54895fe9e1d0cd18ebe5f8a963a4c4a7f2e4f9a..a9d40d32437c04f176e4a46787d24f6a608e69b0 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Dashboard.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8cc83b4a4fa0fe28868e33887824c4e5)
+ * (GenCodeChecksum:2d134bfa6938d2e8a8d8e25e99769823)
  */
 
 /**
  * Database access object for the Dashboard entity.
  */
 class CRM_Core_DAO_Dashboard extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.1';
 
   /**
    * Static instance to hold the table name.
index 914c2d9147a952411ef52a63f78f4e8f60f12ca3..ed2f53e1e1d5e9cdb48909c5ac9af7c5bb5ab8fb 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Discount.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b240911ddcf71cc294fe02614887711c)
+ * (GenCodeChecksum:a23716379d3cccf678a9d8e423690e7c)
  */
 
 /**
  * Database access object for the Discount entity.
  */
 class CRM_Core_DAO_Discount extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.1';
 
   /**
    * Static instance to hold the table name.
index b90d6978127c7111092ea252cff45938d2e87aeb..82ccf0f5a8f9508bb40d0e62b2f2800406f9bd04 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Domain.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:33e01928bc64aa36fb39bbbeea1579dc)
+ * (GenCodeChecksum:57a526de0b2bc02fed832a22dc50ad80)
  */
 
 /**
  * Database access object for the Domain entity.
  */
 class CRM_Core_DAO_Domain extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 92ff31e6ddb268efea8c12e4362a9dab0ccf3e79..7c0a55b812bdbb031ec7904f0752eb9a81ee3a94 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Email.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6e34e9759f2a50eb22dea1fceb15090c)
+ * (GenCodeChecksum:866b627595adac9091080a4e4ab146bc)
  */
 
 /**
  * Database access object for the Email entity.
  */
 class CRM_Core_DAO_Email extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index efef635fb806f837cc8610bc0970818dfaf63b9f..0d32257d1e18d5c8f5d46a905147ac65011fbcef 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/EntityFile.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b9ac4293489f424584b9983d1304987f)
+ * (GenCodeChecksum:f2d4dfec2466ad664b4949983b1c7e58)
  */
 
 /**
  * Database access object for the EntityFile entity.
  */
 class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index 7ef0feff7ecc089d35c53cbf9d75f74eb9a0af08..eb2be19b6666f88d5de59b2b0aac0e7f3266d1af 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/EntityTag.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:3f4e098850d5540fb6ddd3e04d0084fe)
+ * (GenCodeChecksum:58f15f695b38fa4cacfdf82d2734e0f0)
  */
 
 /**
  * Database access object for the EntityTag entity.
  */
 class CRM_Core_DAO_EntityTag extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 3a58bb43c856096780b8a1ccb02758ba7cb66c4d..c666e3ab0222b5338cbb22a59f118ae5cd61c424 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Extension.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:84798b0aba44e90cbdde1d65736c616d)
+ * (GenCodeChecksum:08d2151b75e68f334bd88475b58fab7b)
  */
 
 /**
  * Database access object for the Extension entity.
  */
 class CRM_Core_DAO_Extension extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.2';
 
   /**
    * Static instance to hold the table name.
index 51b0b79200ed21385b3bf9b077ad284b97824b07..dc6508d4a6e48fe001f6e36370e7970094a18448 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/File.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:5c8f93d416373dd32add73f0bbaa59cc)
+ * (GenCodeChecksum:aa0883a815a43dd250612348f3ec470e)
  */
 
 /**
  * Database access object for the File entity.
  */
 class CRM_Core_DAO_File extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index bee4ce002290ddfc3847c006e9d9b9405b5d31e9..958b4dda190c5e123d76685c1d6ad163c543240d 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/IM.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a01a1aec350383201dbc1c3f59e9b709)
+ * (GenCodeChecksum:da6b080a31b208a71635d272fabab7ec)
  */
 
 /**
  * Database access object for the IM entity.
  */
 class CRM_Core_DAO_IM extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 39d72b975480240ef3285f45663ef4f1a1cfb68b..ebdb62818e4e9a77330b8a13efeb1ddf57d0fc03 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Job.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8f64b00207fd2c2f98c378c01e29b911)
+ * (GenCodeChecksum:6e3a5de515fda550b1b5aeb493c50f0b)
  */
 
 /**
  * Database access object for the Job entity.
  */
 class CRM_Core_DAO_Job extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.1';
 
   /**
    * Static instance to hold the table name.
index 59e75d9fabe4f1846915baa6d2f14cca6586450a..b59a98b1f5b2c5f509febbd870024fe0bc57c72c 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/JobLog.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d5266d899de027b3411970632fd2d6ef)
+ * (GenCodeChecksum:eca8e7af1026dbfaf7beecb95ce02361)
  */
 
 /**
  * Database access object for the JobLog entity.
  */
 class CRM_Core_DAO_JobLog extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.1';
 
   /**
    * Static instance to hold the table name.
index fcac92b27c5e360f8d6d8a6ec0cae89b8edf34d9..154a2e776c611457313b7891800c34bfe2a1d868 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/LocBlock.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:fd6b47fdf91519058cc607ab736a8934)
+ * (GenCodeChecksum:8459c5a6d25e5c70e44de49b109a82fa)
  */
 
 /**
  * Database access object for the LocBlock entity.
  */
 class CRM_Core_DAO_LocBlock extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index b75a338c7d0cee15cfa49cd30be666cee24a9f2e..70648f67db31fbe838d863c08ef0e13b3fa679a5 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/LocationType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:06904ebbc78a929b34c17ba1bb580350)
+ * (GenCodeChecksum:325ccb933339bc909efc7d6b60c7186b)
  */
 
 /**
  * Database access object for the LocationType entity.
  */
 class CRM_Core_DAO_LocationType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index c9541016bfd376f55a0241d859a21306f47944b9..182d42f5d40e5979f3dd592939d85079a18213b4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Log.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a102ecbdf345a1df748ea11fdd997b9e)
+ * (GenCodeChecksum:5dfdb2863ba1bc7b84288a522cdaef51)
  */
 
 /**
  * Database access object for the Log entity.
  */
 class CRM_Core_DAO_Log extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index 343c7e6bfdbca6abd97c818fb7bae4c885d27567..acc8278c190423109dc960345d58cb4c9e33bb72 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/MailSettings.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:455750fee6f1acbe50aeb19387f12158)
+ * (GenCodeChecksum:b43716d8c8e362738d8d3420e8fbe03d)
  */
 
 /**
  * Database access object for the MailSettings entity.
  */
 class CRM_Core_DAO_MailSettings extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.2';
 
   /**
    * Static instance to hold the table name.
index 4d4cbafdfdcb25249ca14b50d1e86195d8a4863f..212817ec7860199c70106ef5e58520302f432bee 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Managed.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:939c0ed6422323450f5b9b00f8da85ad)
+ * (GenCodeChecksum:e6146e35f8c8321e600a4198cbd6949e)
  */
 
 /**
  * Database access object for the Managed entity.
  */
 class CRM_Core_DAO_Managed extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.2';
 
   /**
    * Static instance to hold the table name.
index 5b7121f90fc0714d4f9b5285c434fb1904eae377..59505d1d5fb0ade1c846554322ecd57b50f377ef 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Mapping.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ca067ae4e0d6b7c01e9c24da7cff585a)
+ * (GenCodeChecksum:c97b13ea2aaccdf8ba13b6552ccb59f2)
  */
 
 /**
  * Database access object for the Mapping entity.
  */
 class CRM_Core_DAO_Mapping extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.2';
 
   /**
    * Static instance to hold the table name.
index c8e0f48dda9bd42137d18c47cb54affab50d3746..cd5f06e741b4969d8f6c9194cf12c558d941f1be 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/MappingField.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c29cb464b46084c28cedf37c3757ffd1)
+ * (GenCodeChecksum:3702a3c3cb9cd696eb829d15f4676439)
  */
 
 /**
  * Database access object for the MappingField entity.
  */
 class CRM_Core_DAO_MappingField extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.2';
 
   /**
    * Static instance to hold the table name.
index a0f1b6c6ea3a248b11c64602ffa2822706250d50..98f3f4ad1491e196def19bf19f93fab70a2fde00 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Menu.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8eaee41a6e8192bd26fab7f4ef443c0c)
+ * (GenCodeChecksum:8be7941b4dccb08266109e3e1599159f)
  */
 
 /**
  * Database access object for the Menu entity.
  */
 class CRM_Core_DAO_Menu extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 54b4664182cae7e39261edd4c9f60391c6021714..5c7965c83f83e91cc309268fa5289dbd8548c5e4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/MessageTemplate.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:542e52d6f757c9e8adfa2a5ed07b6475)
+ * (GenCodeChecksum:68dd4ac3c9f098e3577dbed8d5a2a105)
  */
 
 /**
  * Database access object for the MessageTemplate entity.
  */
 class CRM_Core_DAO_MessageTemplate extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.6';
 
   /**
    * Static instance to hold the table name.
index 81125e4f02b581b42dc2a786393219ec0dac62a0..b567777810a4405d38851f507252262671f64af7 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Navigation.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:39aa4b4d2c380d3a08c4931c3e497006)
+ * (GenCodeChecksum:34c3d3b834400b49f1b8c6c99a08c99e)
  */
 
 /**
  * Database access object for the Navigation entity.
  */
 class CRM_Core_DAO_Navigation extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.0';
 
   /**
    * Static instance to hold the table name.
index c5cd339ea7d18af8b695cabff4e86b4714e0f9ad..748d1076f18eca09adf58db42d3dad389ec04900 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Note.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:0e43e07bfbf7de4e7fa48f4d24a923fd)
+ * (GenCodeChecksum:86e72396a497a58c1568d0d081435e75)
  */
 
 /**
  * Database access object for the Note entity.
  */
 class CRM_Core_DAO_Note extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 02db0f94b5ff458bbcf238fb2e1d09eca6f31bde..1a61aba156032d6f376fec6bf0310a2e264e1f87 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/OpenID.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ed6e574083475c9caf6e8f5028510263)
+ * (GenCodeChecksum:4d60933113e2b5330dd8194e7ebe6ae4)
  */
 
 /**
  * Database access object for the OpenID entity.
  */
 class CRM_Core_DAO_OpenID extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index 28611f23acf74604942ef6c42037769aa884d2b0..9feb9fd8f107cf13be5610f4976fe49de1929943 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/OptionGroup.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8a0474f902f423a6055399c438cd406c)
+ * (GenCodeChecksum:d0011ad2bb6c090eeb86d25916c5624b)
  */
 
 /**
  * Database access object for the OptionGroup entity.
  */
 class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index ed5bf88c5f753eb682277f146a1b9254959eb082..7f0c3644f208aa9db0ef521c0f066bb9de23a826 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/OptionValue.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:370198cee250edd2f29743a5b5667e9a)
+ * (GenCodeChecksum:e51b16ecfe5f8302c8610b7f5dfd55e5)
  */
 
 /**
  * Database access object for the OptionValue entity.
  */
 class CRM_Core_DAO_OptionValue extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index 444c0b3a53e71a52fcde62618700bd558f835063..27089a4c790733527e60b7fa506a3c2a64468386 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Phone.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:3c1f1743128af72b009c6cf4effc1da2)
+ * (GenCodeChecksum:49f2d961afab0fe5b18a91bd1371cf35)
  */
 
 /**
  * Database access object for the Phone entity.
  */
 class CRM_Core_DAO_Phone extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
@@ -289,7 +291,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
         'phone_type_id' => [
           'name' => 'phone_type_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Phone Type'),
+          'title' => ts('Phone Type ID'),
           'description' => ts('Which type of phone does this number belongs.'),
           'where' => 'civicrm_phone.phone_type_id',
           'export' => TRUE,
index 4f50074007651af047622224456d710d13bd0638..b1d08e7cd045d04aacab815891eba79b58b35701 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/PreferencesDate.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e950a7985ee12a8b5ec6e926e8a49b20)
+ * (GenCodeChecksum:21383b05b8c8e98ed1721aab06031907)
  */
 
 /**
  * Database access object for the PreferencesDate entity.
  */
 class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index cb581127894658cce9f0bbbf3c4a4540f31d47e1..a39549db9e6c467e88ef7eefa66dd14b9feb57ef 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/PrevNextCache.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:3e1ec2353f61b542cca9c3c9efc73e80)
+ * (GenCodeChecksum:8086ffe55554b0fba698136fd6dee894)
  */
 
 /**
  * Database access object for the PrevNextCache entity.
  */
 class CRM_Core_DAO_PrevNextCache extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.4';
 
   /**
    * Static instance to hold the table name.
index c0d4463fe2120be7f58220c191a77bb4456ebcfa..129e80804da9c2a2c7a5bd52aaf16ec8bbf38b5b 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/PrintLabel.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b98543c0a9d27b4f6aef0ab432bb37e2)
+ * (GenCodeChecksum:484a16ebc1b881e7718bfcf139024ee7)
  */
 
 /**
  * Database access object for the PrintLabel entity.
  */
 class CRM_Core_DAO_PrintLabel extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.4';
 
   /**
    * Static instance to hold the table name.
index e6463e239dfcdd4a6f16d0d37bd5b473e4f3646d..d22aa96ac773d2b782c7236cbda2939ccd5c5516 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/RecurringEntity.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4d0ee948935c36ddf9c0a04ed30ec44f)
+ * (GenCodeChecksum:b78474c715335f7689a9a5fcdcb5718e)
  */
 
 /**
  * Database access object for the RecurringEntity entity.
  */
 class CRM_Core_DAO_RecurringEntity extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.6';
 
   /**
    * Static instance to hold the table name.
index 70ac634cfd6feb7a1a99485d2ecc1d7da960f135..160f781cda0f36f080989606a55240bffd23260d 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Setting.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:196dea902e132f8ba6ffb8b108ee1996)
+ * (GenCodeChecksum:c1fda2807e8265021ffaa490325a7e4f)
  */
 
 /**
  * Database access object for the Setting entity.
  */
 class CRM_Core_DAO_Setting extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.1';
 
   /**
    * Static instance to hold the table name.
index eed42f3859b0cd9cd472cec3e8a9ac7bdf708e0f..80a91c2e1f15debe29d19e8be6370a09f7f877e2 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/StateProvince.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:22bfd6264c17c80a3638b9860cb97767)
+ * (GenCodeChecksum:2dced9a7a3e6be3d05ea7b7babe4b113)
  */
 
 /**
  * Database access object for the StateProvince entity.
  */
 class CRM_Core_DAO_StateProvince extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 471513595b1f13cfc54893fff5d797a16a822f7e..b06b206f24836be57396a808f7f8b63158e4d610 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/StatusPreference.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:48ca8492c6febf737281831d72147a38)
+ * (GenCodeChecksum:1fa80acc24bcb14df3947cba2daa930f)
  */
 
 /**
  * Database access object for the StatusPreference entity.
  */
 class CRM_Core_DAO_StatusPreference extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.7';
 
   /**
    * Static instance to hold the table name.
index 22d57c06a4556e31fd0f84587922e2523c5354bf..c18ee55ebca7dd4faa51523d4b4a31c9d9d98781 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/SystemLog.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c90dd839d7756d95a85e38cadbcb40c9)
+ * (GenCodeChecksum:46d7f317ffb5d01d9cb22898ce38abb3)
  */
 
 /**
  * Database access object for the SystemLog entity.
  */
 class CRM_Core_DAO_SystemLog extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.5';
 
   /**
    * Static instance to hold the table name.
index 09e7ec787d8664acda5bdb832a5b603ce081f233..65ae7a378b80abf5e8ce5bd8d2110b4f3b7853a2 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Tag.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:71590516eaae029ef71f6f4b3d7a800d)
+ * (GenCodeChecksum:7a2eb010fd96445604104b6ada9c0b99)
  */
 
 /**
  * Database access object for the Tag entity.
  */
 class CRM_Core_DAO_Tag extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index d2cd010c881b045fbc7c6d158c969306bf535998..5f9abdfc6c34bb51d37ece90343520cc7d1b4a0b 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Timezone.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:fc76675346aa5a97d5ce798b9968ee58)
+ * (GenCodeChecksum:fb1089cb65c1587b1242b9d250c664f7)
  */
 
 /**
  * Database access object for the Timezone entity.
  */
 class CRM_Core_DAO_Timezone extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 1d5821d996fd3ac0b2c676d4fc288448d53b7e97..a112e1c6f32f156dbe83f04b2d37f6eb8115be10 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/UFField.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a77a2bfe4b288e20b6929fd3a7532850)
+ * (GenCodeChecksum:e717ec384cfe13629b4fc440af2a99d5)
  */
 
 /**
  * Database access object for the UFField entity.
  */
 class CRM_Core_DAO_UFField extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 500525099792d471308d0858245cca8c6731cb83..ae79d22da8e8343abe11e7d94e866bbf7d690beb 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/UFGroup.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:acf9d6ef6307d473c8a32775aa8e8e66)
+ * (GenCodeChecksum:1cac6e6b80a630f69ce25f709a20e4a3)
  */
 
 /**
  * Database access object for the UFGroup entity.
  */
 class CRM_Core_DAO_UFGroup extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 0477c90288ecb2f186a1053c0408bace27f49000..98639423b142cbc65deae012b9a98c4eaec1e5e3 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/UFJoin.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:70a227711539c0b5fdea5349d18e6b7f)
+ * (GenCodeChecksum:191143bced279d48cf34cdf6cf85a5fb)
  */
 
 /**
  * Database access object for the UFJoin entity.
  */
 class CRM_Core_DAO_UFJoin extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.3';
 
   /**
    * Static instance to hold the table name.
index 6712ed2c008dab6e55a1a9634e53e0cea069aa08..fa08f60b222fc97675444b17341dc41929e2df83 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/UFMatch.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4d249265c27fb6dbe50e0589ddfed7d2)
+ * (GenCodeChecksum:4fca2151c2ecbd762ac9e2f067f0030f)
  */
 
 /**
  * Database access object for the UFMatch entity.
  */
 class CRM_Core_DAO_UFMatch extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.1';
 
   /**
    * Static instance to hold the table name.
index 678e898f992c8e209e8704b38aa2296281e4c8c9..e9415359c1143aced76d2b52b5caa65511a2b136 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Website.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:2b048fb746a5762a6e132fe7b1e8dd07)
+ * (GenCodeChecksum:9e449b1f3a997b63c79066bd5cd782ae)
  */
 
 /**
  * Database access object for the Website entity.
  */
 class CRM_Core_DAO_Website extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.2';
 
   /**
    * Static instance to hold the table name.
index 42c2051b312249daf57c339a9186984f57ccd119..65ac087b554357b7f7e862727dc7047e9bd2a0d4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/WordReplacement.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d7e1414f899a3bcabd20806508741f55)
+ * (GenCodeChecksum:f4afc331da543068dba6d243d98b8e39)
  */
 
 /**
  * Database access object for the WordReplacement entity.
  */
 class CRM_Core_DAO_WordReplacement extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.4';
 
   /**
    * Static instance to hold the table name.
index 86b740932364db67a97e1dbe16405fe54fcd1193..1dd866013d6030c445f68c7d73acaeb18eb8dee8 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Core/Worldregion.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8045c0ab7f128626a594fbb634e2f169)
+ * (GenCodeChecksum:0312ba4169a285839ec54d655ff5ceb3)
  */
 
 /**
  * Database access object for the Worldregion entity.
  */
 class CRM_Core_DAO_Worldregion extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 04f7e8cd39fadc2d311ac8824c73b51340ca4034..ee418c306b8b472532c0137b4cf3f2a815b59903 100644 (file)
@@ -586,6 +586,9 @@ class CRM_Core_Error extends PEAR_ErrorStack {
       if ($config->userSystem->is_drupal and function_exists('watchdog')) {
         watchdog('civicrm', '%message', ['%message' => $message], $priority ?? WATCHDOG_DEBUG);
       }
+      elseif ($config->userSystem->is_drupal and CIVICRM_UF == 'Drupal8') {
+        \Drupal::logger('civicrm')->log($priority ?? \Drupal\Core\Logger\RfcLogLevel::DEBUG, '%message', ['%message' => $message]);
+      }
     }
 
     return $str;
index 5870c4424d5ebb144de716038d858d360daf037b..7f8696732fedef6bc99b698740d6fef20066f8da 100644 (file)
@@ -40,8 +40,9 @@ class CRM_Core_PrevNextCache_Sql implements CRM_Core_PrevNextCache_Interface {
     $insertSQL = "
 INSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)
 ";
-    $result = CRM_Core_DAO::executeQuery($insertSQL . $sql, $sqlParams, FALSE, NULL, FALSE, TRUE, TRUE);
+    $result = CRM_Core_DAO::executeQuery($insertSQL . $sql, $sqlParams, FALSE);
     if (is_a($result, 'DB_Error')) {
+      CRM_Core_Error::deprecatedFunctionWarning('errors are not expected to be returned');
       throw new CRM_Core_Exception($result->message);
     }
     return TRUE;
index 242387ca65af1109ac8cffd45e6d5856d43bd221..06cece6bc9e7fd08e0da124e6e16fb39b945f710 100644 (file)
@@ -48,10 +48,6 @@ class CRM_Core_Region {
    * @param string $name
    */
   public function __construct($name) {
-    // Templates injected into regions should normally be file names, but sometimes inline notation is handy.
-    require_once 'CRM/Core/Smarty/resources/String.php';
-    civicrm_smarty_register_string_resource();
-
     $this->_name = $name;
     $this->_snippets = [];
 
@@ -223,7 +219,6 @@ class CRM_Core_Region {
           break;
 
         default:
-          require_once 'CRM/Core/Exception.php';
           throw new CRM_Core_Exception(ts('Snippet type %1 is unrecognized',
             [1 => $snippet['type']]));
       }
@@ -254,48 +249,4 @@ class CRM_Core_Region {
     return 0;
   }
 
-  /**
-   * Add block of static HTML to a region.
-   *
-   * @param string $markup
-   *   HTML.
-   *
-   * public function addMarkup($markup) {
-   * return $this->add(array(
-   * 'type' => 'markup',
-   * 'markup' => $markup,
-   * ));
-   * }
-   *
-   * /**
-   * Add a Smarty template file to a region.
-   *
-   * Note: File is not evaluated until the page is rendered
-   *
-   * @param string $template
-   *   Path to the Smarty template file.
-   *
-   * public function addTemplate($template) {
-   * return $this->add(array(
-   * 'type' => 'template',
-   * 'template' => $template,
-   * ));
-   * }
-   *
-   * /**
-   * Use a callback function to extend a region.
-   *
-   * @param mixed $callback
-   * @param array $arguments
-   *   Optional, array of parameters for callback; if omitted, the default arguments are ($snippetSpec, $html).
-   *
-   * public function addCallback($callback, $arguments = FALSE) {
-   * return $this->add(array(
-   * 'type' => 'callback',
-   * 'callback' => $callback,
-   * 'arguments' => $arguments,
-   * ));
-   * }
-   */
-
 }
index f8190512c98e19e7c76ebaf3e4e2451bd89ea091..b0b70337bd8a60876f7eca1180c5177144df75cf 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Cxn/Cxn.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:bafb13cb7901c4f15b5348e2bf9a27b5)
+ * (GenCodeChecksum:059dd4994211085d728a9fc8b7d80803)
  */
 
 /**
  * Database access object for the Cxn entity.
  */
 class CRM_Cxn_DAO_Cxn extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.6';
 
   /**
    * Static instance to hold the table name.
index 2d479b45dac46473c0b6dc7551ac4201884a61bc..cdbb87cc90c7b5ba3adc8a051224eec0f87b7fd3 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Dedupe/Exception.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ea7ca2395c6d2d927c35a7241d621cdd)
+ * (GenCodeChecksum:f4bc21b42b1b5c9cfb0ffa7d3eb46e65)
  */
 
 /**
  * Database access object for the Exception entity.
  */
 class CRM_Dedupe_DAO_Exception extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.3';
 
   /**
    * Static instance to hold the table name.
index df7521454ec10200eaaf3f26cd2203c1b8698835..dea3d38759d4c96ce5822ba452671fd266ea3c22 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Dedupe/Rule.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e218ab6aaed8b58ef6dc189845a36755)
+ * (GenCodeChecksum:56abeb7ada5e3dfde910bc5033ca047d)
  */
 
 /**
  * Database access object for the Rule entity.
  */
 class CRM_Dedupe_DAO_Rule extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 7caf59d70bd9375d206e97dfaae878ee842523ff..366ff64246d5e3d0ca78a01709223e41db7305b4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Dedupe/RuleGroup.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:3c21b8b33d8d561b1104318fba0db930)
+ * (GenCodeChecksum:87a385df0b5bca8150117411f2c31a4a)
  */
 
 /**
  * Database access object for the RuleGroup entity.
  */
 class CRM_Dedupe_DAO_RuleGroup extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 4683add13d075e9cc592939c65552d26cc362063..38da6b32272d210f3ee7c86576a908a48e075e56 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Event/Cart/Cart.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c0fdef43850965dce80a73e66caa3ceb)
+ * (GenCodeChecksum:b4aacbeb6deddb31e520ce700e774db5)
  */
 
 /**
  * Database access object for the Cart entity.
  */
 class CRM_Event_Cart_DAO_Cart extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index e10ee7974f4ffdaf43dfbae6c4d4e02a77de9695..d1550cd54ad61d1c01258fd53aa70168817eebce 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Event/Cart/EventInCart.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a995a300028b34f7b866a41b2e2b96bf)
+ * (GenCodeChecksum:b1cb9524ae26740c93dda80d0cb4ff91)
  */
 
 /**
  * Database access object for the EventInCart entity.
  */
 class CRM_Event_Cart_DAO_EventInCart extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index adcf39c5d7aa45f2865139a9bc5dc21aa72f9b5d..ea27687ddc82c95cc2c56df79d5ccd91ef0f8879 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Event/Event.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:331a210ceb36b5e9460705dbfbe71abf)
+ * (GenCodeChecksum:ad8debb948e4646b04fb46991c0867db)
  */
 
 /**
  * Database access object for the Event entity.
  */
 class CRM_Event_DAO_Event extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.7';
 
   /**
    * Static instance to hold the table name.
@@ -865,6 +867,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 09f5bc0a9393665d28339b7a5d622897e33cfb81..94db537c3abe12954e9d5cbbf37d1316e1530255 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Event/Participant.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:5ae3aa69ac3d004f649038adbf993b8b)
+ * (GenCodeChecksum:bf8ed42264e81ccaef0ae236242990d0)
  */
 
 /**
  * Database access object for the Participant entity.
  */
 class CRM_Event_DAO_Participant extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.7';
 
   /**
    * Static instance to hold the table name.
index b45665ccf3d3f0bc42ceec7354d01a593d233691..ee0070dfc21351b1e72e740c038ad82c51942c89 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Event/ParticipantPayment.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ad58ecbb570f97b4a2d459d750e8f9b3)
+ * (GenCodeChecksum:0c828890e84b791e0432445eb2d01086)
  */
 
 /**
  * Database access object for the ParticipantPayment entity.
  */
 class CRM_Event_DAO_ParticipantPayment extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.7';
 
   /**
    * Static instance to hold the table name.
index a21a423e1a03bf43def614d85cea7c28924b0724..2b6e4f8f030f152499f879e9a2bad0f1d9c55d44 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ede2497e706ee17bb6dce92b72a2c535)
+ * (GenCodeChecksum:4a3012f88c67826cb4264a3340e908ec)
  */
 
 /**
  * Database access object for the ParticipantStatusType entity.
  */
 class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.0';
 
   /**
    * Static instance to hold the table name.
index 60c124a6791d1ebf6df102603f546c3328b29288..e8c5bbe6282e2f43a4db8bed5f1e028cafeda826 100644 (file)
@@ -545,7 +545,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 97ecf1f6f8bf0ffb02cb650ed2064801d8da75b0..4b2692e67b515cb8221836b1e71692fc164ca479 100644 (file)
@@ -18,6 +18,7 @@
  * This class generates form components for processing Event.
  */
 class CRM_Event_Form_Registration extends CRM_Core_Form {
+
   use CRM_Financial_Form_FrontEndPaymentFormTrait;
 
   /**
@@ -142,7 +143,9 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
   public $_isEventFull;
 
   public $_lineItem;
+
   public $_lineItemParticipantsCount;
+
   public $_availableRegistrations;
 
   /**
@@ -224,7 +227,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
       $this->_values = $this->_fields = [];
 
       //retrieve event information
-      $params = array('id' => $this->_eventId);
+      $params = ['id' => $this->_eventId];
       CRM_Event_BAO_Event::retrieve($params, $this->_values['event']);
       // check for is_monetary status
       $isMonetary = $this->_values['event']['is_monetary'] ?? NULL;
@@ -294,12 +297,12 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
       self::initEventFee($this, $this->_eventId);
 
       // get the profile ids
-      $ufJoinParams = array(
+      $ufJoinParams = [
         'entity_table' => 'civicrm_event',
         // CRM-4377: CiviEvent for the main participant, CiviEvent_Additional for additional participants
         'module' => 'CiviEvent',
         'entity_id' => $this->_eventId,
-      );
+      ];
       list($this->_values['custom_pre_id'],
         $this->_values['custom_post_id']
         ) = CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);
@@ -336,7 +339,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
       if ($this->_values['event']['is_monetary']) {
         CRM_Core_Payment_Form::setPaymentFieldsByProcessor($this, $this->_paymentProcessor);
       }
-      $params = array('entity_id' => $this->_eventId, 'entity_table' => 'civicrm_event');
+      $params = ['entity_id' => $this->_eventId, 'entity_table' => 'civicrm_event'];
       $this->_values['location'] = CRM_Core_BAO_Location::getValues($params, TRUE);
 
       $this->set('values', $this->_values);
@@ -344,9 +347,9 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
 
       $this->_availableRegistrations
         = CRM_Event_BAO_Participant::eventFull(
-          $this->_values['event']['id'], TRUE,
-          CRM_Utils_Array::value('has_waitlist', $this->_values['event'])
-        );
+        $this->_values['event']['id'], TRUE,
+        CRM_Utils_Array::value('has_waitlist', $this->_values['event'])
+      );
       $this->set('availableRegistrations', $this->_availableRegistrations);
     }
     $this->assign_by_ref('paymentProcessor', $this->_paymentProcessor);
@@ -429,14 +432,14 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
     $this->assign('billingName', $name);
     $this->set('name', $name);
 
-    $vars = array(
+    $vars = [
       'amount',
       'currencyID',
       'credit_card_type',
       'trxn_id',
       'amount_level',
       'receive_date',
-    );
+    ];
 
     foreach ($vars as $v) {
       if (!empty($params[$v])) {
@@ -501,10 +504,10 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
 
       // we don't allow conflicting fields to be
       // configured via profile
-      $fieldsToIgnore = array(
+      $fieldsToIgnore = [
         'participant_fee_amount' => 1,
         'participant_fee_level' => 1,
-      );
+      ];
       if ($contactID) {
         //FIX CRM-9653
         if (is_array($id)) {
@@ -655,7 +658,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
     }
     if ($isPaidEvent && empty($form->_values['fee'])) {
       if (CRM_Utils_System::getClassName($form) != 'CRM_Event_Form_Participant') {
-        CRM_Core_Error::statusBounce(ts('No Fee Level(s) or Price Set is configured for this event.<br />Click <a href=\'%1\'>CiviEvent >> Manage Event >> Configure >> Event Fees</a> to configure the Fee Level(s) or Price Set for this event.', array(1 => CRM_Utils_System::url('civicrm/event/manage/fee', 'reset=1&action=update&id=' . $form->_eventId))));
+        CRM_Core_Error::statusBounce(ts('No Fee Level(s) or Price Set is configured for this event.<br />Click <a href=\'%1\'>CiviEvent >> Manage Event >> Configure >> Event Fees</a> to configure the Fee Level(s) or Price Set for this event.', [1 => CRM_Utils_System::url('civicrm/event/manage/fee', 'reset=1&action=update&id=' . $form->_eventId)]));
       }
     }
   }
@@ -788,7 +791,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
     }
 
     $participantFields = CRM_Event_DAO_Participant::fields();
-    $participantParams = array(
+    $participantParams = [
       'id' => $params['participant_id'] ?? NULL,
       'contact_id' => $contactID,
       'event_id' => $form->_eventId ? $form->_eventId : $params['event_id'],
@@ -808,7 +811,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
       'discount_id' => $params['discount_id'] ?? NULL,
       'fee_currency' => $params['currencyID'] ?? NULL,
       'campaign_id' => $params['campaign_id'] ?? NULL,
-    );
+    ];
 
     if ($form->_action & CRM_Core_Action::PREVIEW || CRM_Utils_Array::value('mode', $params) == 'test') {
       $participantParams['is_test'] = 1;
@@ -888,7 +891,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
     //first format the params.
     if ($singleFormParams) {
       $params = self::formatPriceSetParams($form, $params);
-      $params = array($params);
+      $params = [$params];
     }
 
     foreach ($params as $key => $values) {
@@ -976,10 +979,10 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
         $field = $priceSetDetails['fields'][$fieldId];
         if ($field['html_type'] == 'Text') {
           $fieldOption = current($field['options']);
-          $value = array($fieldOption['id'] => $value);
+          $value = [$fieldOption['id'] => $value];
         }
         else {
-          $value = array($value => TRUE);
+          $value = [$value => TRUE];
         }
       }
     }
@@ -1162,7 +1165,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
             foreach ($element->_options as $option) {
               if ($option['attr']['value'] === "crm_disabled_opt-{$value[0]}") {
                 $placeholder = html_entity_decode($option['text'], ENT_QUOTES, "UTF-8");
-                $element->updateAttributes(array('placeholder' => $placeholder));
+                $element->updateAttributes(['placeholder' => $placeholder]);
                 break;
               }
             }
@@ -1192,11 +1195,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
     ) {
       return;
     }
-    foreach (array(
-      'constantValues',
-      'submitValues',
-      'defaultValues',
-    ) as $val) {
+    foreach (['constantValues', 'submitValues', 'defaultValues'] as $val) {
       $values = $form->{"_$val"};
       if (!is_array($values) || empty($values)) {
         continue;
@@ -1331,7 +1330,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
 
       //validate for price field selection.
       if (empty($fieldSelected[$pNum])) {
-        $errors[$pNum]['_qf_default'] = ts('Select at least one option from Event Fee(s).');
+        $errors[$pNum]['_qf_default'] = ts('SELECT at least one OPTION FROM EVENT Fee(s).');
       }
     }
 
@@ -1349,11 +1348,11 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
           }
           elseif (($optMax - $opDbCount) == 1) {
             $errors[$soldOutPnum[$optId]]["price_{$fieldId}"]
-              = ts('Sorry, currently only a single space is available for this option.', array(1 => ($optMax - $opDbCount)));
+              = ts('Sorry, currently only a single space is available for this option.', [1 => ($optMax - $opDbCount)]);
           }
           else {
             $errors[$soldOutPnum[$optId]]["price_{$fieldId}"]
-              = ts('Sorry, currently only %1 spaces are available for this option.', array(1 => ($optMax - $opDbCount)));
+              = ts('Sorry, currently only %1 spaces are available for this option.', [1 => ($optMax - $opDbCount)]);
           }
         }
       }
@@ -1373,7 +1372,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
     $this->set('participantId', $this->_participantId);
 
     $ids = $participantValues = [];
-    $participantParams = array('id' => $this->_participantId);
+    $participantParams = ['id' => $this->_participantId];
     CRM_Event_BAO_Participant::getValues($participantParams, $participantValues, $ids);
     $this->_values['participant'] = $participantValues[$this->_participantId];
     $this->set('values', $this->_values);
@@ -1391,11 +1390,12 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
   /**
    * Check if event is valid.
    *
+   * @param string $redirect
+   *
    * @todo - combine this with CRM_Event_BAO_Event::validRegistrationRequest
    * (probably extract relevant values here & call that with them & handle bounces & redirects here -as
    * those belong in the form layer)
    *
-   * @param string $redirect
    */
   public function checkValidEvent($redirect = NULL) {
     // is the event active (enabled)?
@@ -1423,7 +1423,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
       $startDate &&
       $startDate >= $now
     ) {
-      CRM_Core_Error::statusBounce(ts('Registration for this event begins on %1', array(1 => CRM_Utils_Date::customFormat(CRM_Utils_Array::value('registration_start_date', $this->_values['event'])))), $redirect, ts('Sorry'));
+      CRM_Core_Error::statusBounce(ts('Registration for this event begins on %1', [1 => CRM_Utils_Date::customFormat(CRM_Utils_Array::value('registration_start_date', $this->_values['event']))]), $redirect, ts('Sorry'));
     }
 
     $regEndDate = CRM_Utils_Date::processDate(CRM_Utils_Array::value('registration_end_date',
@@ -1435,7 +1435,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
       if (empty($regEndDate)) {
         $endDate = CRM_Utils_Date::customFormat(CRM_Utils_Array::value('event_end_date', $this->_values['event']));
       }
-      CRM_Core_Error::statusBounce(ts('Registration for this event ended on %1', array(1 => $endDate)), $redirect, ts('Sorry'));
+      CRM_Core_Error::statusBounce(ts('Registration for this event ended on %1', [1 => $endDate]), $redirect, ts('Sorry'));
     }
   }
 
index 1dc733d9fd534a65a9c23826f4612458fc15e9b9..681697984bf06e08f63e5fc704807a816dd9d3c9 100644 (file)
@@ -971,7 +971,6 @@ class CRM_Export_BAO_ExportProcessor {
     if ($this->isHouseholdToSkip($iterationDAO->contact_id)) {
       return FALSE;
     }
-    $phoneTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
     $imProviders = CRM_Core_PseudoConstant::get('CRM_Core_DAO_IM', 'provider_id');
 
     $row = [];
@@ -1002,10 +1001,7 @@ class CRM_Export_BAO_ExportProcessor {
       if (property_exists($iterationDAO, $field)) {
         $fieldValue = $iterationDAO->$field;
         // to get phone type from phone type id
-        if ($field == 'phone_type_id' && isset($phoneTypes[$fieldValue])) {
-          $fieldValue = $phoneTypes[$fieldValue];
-        }
-        elseif ($field == 'provider_id' || $field == 'im_provider') {
+        if ($field == 'provider_id' || $field == 'im_provider') {
           $fieldValue = $imProviders[$fieldValue] ?? NULL;
         }
         elseif (strstr($field, 'master_id')) {
@@ -1152,7 +1148,7 @@ class CRM_Export_BAO_ExportProcessor {
             if (!empty($fieldSpec['context'])) {
               return $i18n->crm_translate($fieldValue, $fieldSpec);
             }
-            if (!empty($fieldSpec['pseudoconstant']) && !empty($fieldSpec['hasLocationType'])) {
+            if (!empty($fieldSpec['pseudoconstant']) && !empty($fieldSpec['hasLocationType']) && $fieldSpec['name'] !== 'phone_type_id') {
               if (!empty($fieldSpec['bao'])) {
                 $transformedValue = CRM_Core_PseudoConstant::getLabel($fieldSpec['bao'], $fieldSpec['name'], $fieldValue);
                 if ($transformedValue) {
@@ -2171,10 +2167,7 @@ WHERE  id IN ( $deleteIDString )
     foreach ($value as $relationField => $relationValue) {
       if (is_object($relDAO) && property_exists($relDAO, $relationField)) {
         $fieldValue = $relDAO->$relationField;
-        if ($relationField == 'phone_type_id') {
-          $fieldValue = $phoneTypes[$relationValue];
-        }
-        elseif ($relationField == 'provider_id') {
+        if ($relationField == 'provider_id') {
           $fieldValue = $imProviders[$relationValue] ?? NULL;
         }
         // CRM-13995
index 20dff31e7fe39f65831abeb211ddd55307ce3cce..f96650badc5908feafc6cc18b53711ebe3e8343e 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/Currency.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:9141d433586789f5ea9003fdbe9fdf9b)
+ * (GenCodeChecksum:5501c59b453dedfb8bba1f2fab44d9ea)
  */
 
 /**
  * Database access object for the Currency entity.
  */
 class CRM_Financial_DAO_Currency extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.7';
 
   /**
    * Static instance to hold the table name.
index a23822f2b408e41cd3ae7db28cc220d32c30592d..973a99ca8330f6d3c97f13ad686f74cc1b50f66a 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/EntityFinancialAccount.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:5ed0eeb7d3f5f2caf668448cd441b004)
+ * (GenCodeChecksum:c1d51696dd326b61f65fd064a355e7fb)
  */
 
 /**
  * Database access object for the EntityFinancialAccount entity.
  */
 class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.3';
 
   /**
    * Static instance to hold the table name.
index b74d080894e941fe4feef6e1cf51db44c6414d87..1f959ad6117bbc7d8bbd062f4322bba7bf48fd1e 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/EntityFinancialTrxn.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a4b054ba0fc5a16cd650bda8941690b1)
+ * (GenCodeChecksum:12eb23afdf6c1208bdc01aa7db52770a)
  */
 
 /**
  * Database access object for the EntityFinancialTrxn entity.
  */
 class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.2';
 
   /**
    * Static instance to hold the table name.
index f6912ae03c1a60e6684e09dcb93f30d993562318..d8f161e9437bae30da0ce056bb6a33b0083f7049 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/FinancialAccount.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e9c9d66596703d9dfbf411034ce909c4)
+ * (GenCodeChecksum:b9f200ff95d9186180eff484dcd12a57)
  */
 
 /**
  * Database access object for the FinancialAccount entity.
  */
 class CRM_Financial_DAO_FinancialAccount extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.2';
 
   /**
    * Static instance to hold the table name.
index 055c8a5de18fc7f908cb32d7c1683c5cfe73be07..a59dc38e6613ab5215b7e022fb3c045c1c9f9ec1 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/FinancialItem.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4f2e977c0c7c668be342598772b0eb61)
+ * (GenCodeChecksum:8bb63ebee681c2eb4acbf8650b224dc2)
  */
 
 /**
  * Database access object for the FinancialItem entity.
  */
 class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.3';
 
   /**
    * Static instance to hold the table name.
index 47f7ae219782509edf257872a09641c02c00b202..157984607fb373e9c2c0244b3da40703bb73bb0e 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/FinancialTrxn.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:7e2cf7d374cc6e0af61672c0318248b6)
+ * (GenCodeChecksum:5a4324ffe222bf724ab9d4cde26eb4c2)
  */
 
 /**
  * Database access object for the FinancialTrxn entity.
  */
 class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.3';
 
   /**
    * Static instance to hold the table name.
index a047fd348e0f1e06224dbd0ba15206c53195f26c..cd99c56281eb7937e52c6d02eb95f591a7c8b343 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/FinancialType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:81cc1b7a95feede610081f2066eeb147)
+ * (GenCodeChecksum:024b000d94adcc65200c00d7cef5e624)
  */
 
 /**
  * Database access object for the FinancialType entity.
  */
 class CRM_Financial_DAO_FinancialType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.3';
 
   /**
    * Static instance to hold the table name.
index 6122a230769bb9355b21a174b996574ef224fdae..7f1e8334a9678b7b65ceac85d11ad821684a2f09 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:625ab4ba983447ea3e236b48491eeed6)
+ * (GenCodeChecksum:7e296728147d44cb68a9231c4995e461)
  */
 
 /**
  * Database access object for the PaymentProcessor entity.
  */
 class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index c942177b367865aecc76888cb820f6f5685e1c4e..597b8d27f0ff19374d9f8449bfcf63a81561477c 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/PaymentProcessorType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b57486d319cf2c2022b7447a6c53c199)
+ * (GenCodeChecksum:624a9a001f451b6eb17930a9abcceb3e)
  */
 
 /**
  * Database access object for the PaymentProcessorType entity.
  */
 class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 363de403c2403651b0d686675a3ca2e0a3b8c777..cb2498f0832ce707ce30376124dd732ba81670b0 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Financial/PaymentToken.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c135e4bffc93086e83c082bbebc84372)
+ * (GenCodeChecksum:ce51f1e6eaf6b29f3adeb67828e85507)
  */
 
 /**
  * Database access object for the PaymentToken entity.
  */
 class CRM_Financial_DAO_PaymentToken extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.6';
 
   /**
    * Static instance to hold the table name.
index 854c5f5de78a03f2a7f5f1053463613ec5356209..1513ab9dccc5c25e267fb8dd5a3fa27a69a31a9c 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Friend/Friend.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ed3cb6458bdc4ee011d6b30baa9e24ff)
+ * (GenCodeChecksum:3f1c976d43e312175e85da0427f5210d)
  */
 
 /**
  * Database access object for the Friend entity.
  */
 class CRM_Friend_DAO_Friend extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.0';
 
   /**
    * Static instance to hold the table name.
index fa8dd9d09fc54e47319e22406669aecdc199412d..91b816359a758202611ac223750db3454c3777c7 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Grant/Grant.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b09a04b8edb982e838510dfb9d7dbc35)
+ * (GenCodeChecksum:a2e43b7f0fb8547daf5ed874bf6174c5)
  */
 
 /**
  * Database access object for the Grant entity.
  */
 class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 1e6c539e5dc127bbc041d0e096fbbf7eb8210a15..43822bf7c5e3db2db3a8d8ae5cdb2734634fbe2a 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/BouncePattern.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e36e2c40e59bfe04998b2e4e216724b6)
+ * (GenCodeChecksum:90abbaf8e68b5749a084a74d77dcc3b7)
  */
 
 /**
  * Database access object for the BouncePattern entity.
  */
 class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 9bb3db18070b5b55a033c3451a9a831120b52d11..a31f8324f4fe03a1a642eec0fb8ea9ee76540c23 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/BounceType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b2b6ab45aa6fed676d81a68651f0bf93)
+ * (GenCodeChecksum:4e77659bd433033396e84b6de32c99af)
  */
 
 /**
  * Database access object for the BounceType entity.
  */
 class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index e89653ee93180a84d4e0a33f91a3e66d3ed42c42..084489593dcbe2cdb9ea9deac588616ac95eb37c 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Mailing.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:bfcc85d4eb2bab05f214dd946e5fdef6)
+ * (GenCodeChecksum:6a9dc5aaff7aa7f5dcfe3f892255e357)
  */
 
 /**
  * Database access object for the Mailing entity.
  */
 class CRM_Mailing_DAO_Mailing extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 4875b11c502192a21b625b791bdc03489015cb15..0e2215e1fc5f7a80a0f2c98d130825cecc72892c 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/MailingAB.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:fd7f00955d0a5eb4ec56089ccd71f68d)
+ * (GenCodeChecksum:af0f7d34ddde7f3971aaac5abccfcd8c)
  */
 
 /**
  * Database access object for the MailingAB entity.
  */
 class CRM_Mailing_DAO_MailingAB extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index cd35b7cce0d38c183c18ac7d54c6f07d772da54b..f1b81f15629d57afdabbb5028be4dce21039a2bc 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/MailingComponent.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:1d0efc3e5ba8dcd6d6bbc422877b86b4)
+ * (GenCodeChecksum:ca95f8566048836c03e1dc58eb51ac11)
  */
 
 /**
  * Database access object for the MailingComponent entity.
  */
 class CRM_Mailing_DAO_MailingComponent extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 6c1822212c9603dce4e4cded3433370989cf21e8..220bfd13cb08a8554f8d50942feb52ad73f01c80 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/MailingGroup.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:1869c2f625f9a35820d1342217bd7feb)
+ * (GenCodeChecksum:a253e806fcb595ede70c812a10c0dbba)
  */
 
 /**
  * Database access object for the MailingGroup entity.
  */
 class CRM_Mailing_DAO_MailingGroup extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index f803973e1b93bdcc0c2b8896c3627ad3dd005e1a..bde7e35f391efa21fb03a70a15fd96c8aeac78f9 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/MailingJob.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b84e3c6e86ddabfe04066d742f5c0ca5)
+ * (GenCodeChecksum:0c6e76df20fe3579056c287aeed27cdb)
  */
 
 /**
  * Database access object for the MailingJob entity.
  */
 class CRM_Mailing_DAO_MailingJob extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index d3511d4ab73dfbc4b40247dfceb9c142901725ec..1852c7ac022a6aeb4fa60c2207c1dc4c8179e58d 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Recipients.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:589a6adc830c8f9197b5123e08b63ba3)
+ * (GenCodeChecksum:ebd2ec177861f8f82a4bc6bc8b33fd9b)
  */
 
 /**
  * Database access object for the Recipients entity.
  */
 class CRM_Mailing_DAO_Recipients extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index d33871b7b72c521bd70a26ebe589dcfd5782bb9f..6027afd1676cf9875d35a251c211c8fd107c66c8 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Spool.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8e8346020e4f3174bc4c4c2e87d8e136)
+ * (GenCodeChecksum:7bd4a9b64175915a43f602f4f9cfb721)
  */
 
 /**
  * Database access object for the Spool entity.
  */
 class CRM_Mailing_DAO_Spool extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 771c0e469e1750b0079ec6251ef04a15be321f21..3d39634397268e1e0df4006057af18566bc67a83 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/TrackableURL.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6436cc3cfd3b7a43b468c5372ec081be)
+ * (GenCodeChecksum:74f858b4e9e666e05416be884002408b)
  */
 
 /**
  * Database access object for the TrackableURL entity.
  */
 class CRM_Mailing_DAO_TrackableURL extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index b21631b738695dd2136bcb496f57a8dbc88353e5..1cd4024fb4d6cad1d6d96f0cac121e030ef19b62 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Bounce.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ca3431a45bad00b42a6bf347338041ed)
+ * (GenCodeChecksum:8e0590dde97f57494203397255fd4604)
  */
 
 /**
  * Database access object for the Bounce entity.
  */
 class CRM_Mailing_Event_DAO_Bounce extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index bdde918922219e084572dce45dfad62c0cd4fa76..343430c1579dfc5b9c48305ad68394f05bf77676 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Confirm.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:01729079bec5be7346678447b6cf2844)
+ * (GenCodeChecksum:827b011dc50d032e8b74d6d164314d83)
  */
 
 /**
  * Database access object for the Confirm entity.
  */
 class CRM_Mailing_Event_DAO_Confirm extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 1adada28bcb1a6f3a964ac383a67181c61d1b848..147d70fcf82fc642fe9d6d6947eaeacdce6249fd 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Delivered.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ced38ed0f599efdc44cca8dad6049d8c)
+ * (GenCodeChecksum:c983e11b4de5a1c4e6d9765eb7d12755)
  */
 
 /**
  * Database access object for the Delivered entity.
  */
 class CRM_Mailing_Event_DAO_Delivered extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index d5bdfbf7ec1b7f67113387a89879cb672c8d6eab..ac1c8d89670b53ee6841f4354507a708a0937fac 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Forward.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ea0e4a784e682347d7320337cb5bc1ac)
+ * (GenCodeChecksum:359e0b700860c29a1e809fd4acbf7598)
  */
 
 /**
  * Database access object for the Forward entity.
  */
 class CRM_Mailing_Event_DAO_Forward extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 15b5e0394ea3fd32933ba439d25e9f22fa8d3f8c..cbd24372dfa0ba3c77d52f2f0364fedf853544e9 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Opened.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8c6c5978fae73802fbd9984ef51a2576)
+ * (GenCodeChecksum:dddc76ba8461f8b0c1f3c1cdccddd111)
  */
 
 /**
  * Database access object for the Opened entity.
  */
 class CRM_Mailing_Event_DAO_Opened extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 40f075d0b363775123c09961c2b921cfbc472117..073ef521c99712886df7631bfb944d88ac07d5a4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Queue.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:316f29677ad04a5347bfd30cd60f474e)
+ * (GenCodeChecksum:091cb300f1b0a67dfaf40f988806e6cf)
  */
 
 /**
  * Database access object for the Queue entity.
  */
 class CRM_Mailing_Event_DAO_Queue extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 687cd8b30c455e6bc514511505ba1bad494ca081..8fc31b3eb359e704d28f7b9a81d3ee077d5733e8 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Reply.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a8246c6739f95a8e25d17ddebe882db7)
+ * (GenCodeChecksum:b1d572f3d42f6480dc98a2e6f9710fa3)
  */
 
 /**
  * Database access object for the Reply entity.
  */
 class CRM_Mailing_Event_DAO_Reply extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 97e420d72bc92dbf5fca12025a6dcc51706da3e3..ce577b24d76a5e7433fcd0c380168c323060c6c3 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Subscribe.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:acb361992fd2db48c82ee7b13f8b7cf4)
+ * (GenCodeChecksum:9e1dec99f17dcccde7feeca30b880a85)
  */
 
 /**
  * Database access object for the Subscribe entity.
  */
 class CRM_Mailing_Event_DAO_Subscribe extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 07af2524c7d9e2f6f23dc4ed969883db9f78b0bc..88c84b0b920119c676e43600ec6530b58b9a6cbe 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/TrackableURLOpen.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:7d55cf77c7be3a81666b51aaa55c6358)
+ * (GenCodeChecksum:b543a83312f2069a45872939517aa480)
  */
 
 /**
  * Database access object for the TrackableURLOpen entity.
  */
 class CRM_Mailing_Event_DAO_TrackableURLOpen extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 9448593d04146e352e8769ff1ef60a58fa2e76e9..e5a230b66dc76be60070e87969b3db4398cd89c4 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Mailing/Event/Unsubscribe.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d16e98421cdacbf5ad1b5542810fca6c)
+ * (GenCodeChecksum:2d080a63032c9dce0331a6ed4f6c3cd2)
  */
 
 /**
  * Database access object for the Unsubscribe entity.
  */
 class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
 
   /**
    * Static instance to hold the table name.
index 289f9ba2315fcb3f36e436e348e99e9a95277e0b..384c69ae6b5857b66703fee8ea4ed20262dec189 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Member/Membership.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:9a307c1a63b4df70ae38f36ce4171cb6)
+ * (GenCodeChecksum:835c63ea0a55b78d6d115a7a6db5dde2)
  */
 
 /**
  * Database access object for the Membership entity.
  */
 class CRM_Member_DAO_Membership extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index 36b91c2eae02ac4eab1ee3ae16e0651af583f9ea..91e65e6eeb2becf3e7d2174e8c64ed63aa0fa737 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Member/MembershipBlock.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:317a1eb3c0a67ffe4662f939a0b1fb69)
+ * (GenCodeChecksum:8eb2f3a6c818d449da875421b54de619)
  */
 
 /**
  * Database access object for the MembershipBlock entity.
  */
 class CRM_Member_DAO_MembershipBlock extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index 2f44712bc7d0c94fd60fe12e81bda0a913e061eb..bd0b4f7924e54ec306d9b02fa7035db8643b0bfd 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Member/MembershipLog.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ff966b7edcdd126ddef1ee3b3f3bff2f)
+ * (GenCodeChecksum:4d5744b433ca7bb5385b11945cc0fe10)
  */
 
 /**
  * Database access object for the MembershipLog entity.
  */
 class CRM_Member_DAO_MembershipLog extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index 91c700e21a9571c60c33c3cade276efeaa0b0cf6..ac386eee5571056a71d1515f946399cf504202a0 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Member/MembershipPayment.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b2fa8ca60001d75a9049ca179c4e68ce)
+ * (GenCodeChecksum:39168603c262c909ebeee2ce821f0f0d)
  */
 
 /**
  * Database access object for the MembershipPayment entity.
  */
 class CRM_Member_DAO_MembershipPayment extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index c1b2afc1fe68c9f814c00946cd4b02db6b377124..5b780e4a5b9d21399a5f961b7a59ecd6ae7e7cfc 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Member/MembershipStatus.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e6fe414d2b0dc3ff72ee5adcad75fab8)
+ * (GenCodeChecksum:f0c470d5aca6e3696a0ad8345531f8b8)
  */
 
 /**
  * Database access object for the MembershipStatus entity.
  */
 class CRM_Member_DAO_MembershipStatus extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index 63ef86aaaf653d3685eef164dea49761aafd3a21..4b1d6ce509eb7a4ff4eee81e0c9afe5c163b364d 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Member/MembershipType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:20b0eec540f3bb69e386f86b29419391)
+ * (GenCodeChecksum:713057d2c1a6dcb6cbd6449b8934d28c)
  */
 
 /**
  * Database access object for the MembershipType entity.
  */
 class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.5';
 
   /**
    * Static instance to hold the table name.
index f5d8ed236314e36c6d8f0690f44366f273fc465c..eb565696754516f8e27286cbf045c7a7e826fa8e 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/PCP/PCP.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:30c5a26e001449a2ace9e530714e833c)
+ * (GenCodeChecksum:286225e46c4e2f3c12b17cd5f83b210d)
  */
 
 /**
  * Database access object for the PCP entity.
  */
 class CRM_PCP_DAO_PCP extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.2';
 
   /**
    * Static instance to hold the table name.
index 897d9145f3b9f11bb30df5c5017ae7443248b94e..74f5204bebd1689474013f8bbceada3d53e39dd0 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/PCP/PCPBlock.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:039e37edb86cfd25e6c882ce4950e3c9)
+ * (GenCodeChecksum:ea1b4158570c5a79356b1dc0ad80db6a)
  */
 
 /**
  * Database access object for the PCPBlock entity.
  */
 class CRM_PCP_DAO_PCPBlock extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.2';
 
   /**
    * Static instance to hold the table name.
index a7a0fb70802b9875b85c5ce25dbb78c236bfd4d7..5f5a7632ed42f0422aae8074942ad8065b08952c 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Pledge/Pledge.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8373762a2a35ef14b0d763eb27db0f34)
+ * (GenCodeChecksum:27003a5c2de79b60b4114bc92b65cc07)
  */
 
 /**
  * Database access object for the Pledge entity.
  */
 class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.1';
 
   /**
    * Static instance to hold the table name.
index 1cb20cb50e2ec0d31befe22c314296d130ba2f14..989b14383d7a69eec50cbc6f77f234a427ff31e2 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Pledge/PledgeBlock.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:fd4a1319ac7b6cdc29baa3e9e4df68de)
+ * (GenCodeChecksum:bf3640355f445e127c25402500d79668)
  */
 
 /**
  * Database access object for the PledgeBlock entity.
  */
 class CRM_Pledge_DAO_PledgeBlock extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.1';
 
   /**
    * Static instance to hold the table name.
index b072dd7f069fdc0b7a82af573e2a8484e136b3d9..234a5342b2f73204ab0f2e8b3c3c1bd56724c024 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Pledge/PledgePayment.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:64c6aef9e06ba7320d917ec5515c5ffc)
+ * (GenCodeChecksum:c47a2cbc83c672a8209bc5e725b2f81a)
  */
 
 /**
  * Database access object for the PledgePayment entity.
  */
 class CRM_Pledge_DAO_PledgePayment extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.1';
 
   /**
    * Static instance to hold the table name.
index 1b09a54dc9f2f15a3492090492994d7567de335f..2ad0da2b2957c832bd1f7e75beadee464af8ab31 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Price/LineItem.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:84c128f076238b53a8c0c6dd23a22587)
+ * (GenCodeChecksum:7403b3615b0225350d893750a547061a)
  */
 
 /**
  * Database access object for the LineItem entity.
  */
 class CRM_Price_DAO_LineItem extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.7';
 
   /**
    * Static instance to hold the table name.
index babe80632895216759756c1e8c821cb9e347172b..e14f60999bfe2a6297e858f5b9d80d48b781b181 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Price/PriceField.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:7e0a818f8b8641ca3bae0abe1582c8ce)
+ * (GenCodeChecksum:1492c6421f1c3cb49dcab88bc411075c)
  */
 
 /**
  * Database access object for the PriceField entity.
  */
 class CRM_Price_DAO_PriceField extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 01aff179797e27985e54b00c84879293489a1e71..25737ee9fb4b6fcd4bc2cb937b33cfce2e40f296 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Price/PriceFieldValue.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:11a02f3576be10e8c2a0ea47a19e2dac)
+ * (GenCodeChecksum:4ce556d152a07393048aa1bc0a0e3ed0)
  */
 
 /**
  * Database access object for the PriceFieldValue entity.
  */
 class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '3.3';
 
   /**
    * Static instance to hold the table name.
index 8fc97986b9fa74cbc13fea32df3bff2c58714220..1dd84351706af0cc2ba0050d707cdb5ffdd8f307 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Price/PriceSet.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:53c1906856d1a16d2edba1caa6a4fafc)
+ * (GenCodeChecksum:52d1fb1b25eaa8f1c157012bfec0eaae)
  */
 
 /**
  * Database access object for the PriceSet entity.
  */
 class CRM_Price_DAO_PriceSet extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 36ec1ec20a042b353c4874853a8a653bfc718d8c..78e479a53a754dd5d0b21e970a826ef93e9f10fc 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Price/PriceSetEntity.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a37bda1a3508a9195c561c2b2e4f03a7)
+ * (GenCodeChecksum:f2d6aeda95e4bde969d5ccebe9f26791)
  */
 
 /**
  * Database access object for the PriceSetEntity entity.
  */
 class CRM_Price_DAO_PriceSetEntity extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.8';
 
   /**
    * Static instance to hold the table name.
index 64ea7e895041eb8bf07d7ca8400bda13beccb2be..a78b613e154da0ef032542f9c076e6c499e226e8 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Queue/QueueItem.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:f71816c891a0730a45d4363883a5756c)
+ * (GenCodeChecksum:7e484400a7f8cf682b9c85e8b10c7bc7)
  */
 
 /**
  * Database access object for the QueueItem entity.
  */
 class CRM_Queue_DAO_QueueItem extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.2';
 
   /**
    * Static instance to hold the table name.
index 591332e6701678c2610e21e28e32137252f82ac8..08a380c76fd3e548f7e3646ab57cf092d3a68010 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Report/ReportInstance.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:5e7790bacc5ffff1ecfcaada1abeafec)
+ * (GenCodeChecksum:d0c9e5593f161f18e7979012c4c13724)
  */
 
 /**
  * Database access object for the ReportInstance entity.
  */
 class CRM_Report_DAO_ReportInstance extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '2.2';
 
   /**
    * Static instance to hold the table name.
index 4289f9020bea9dfb584d50b477dd7d878304db17..1bee34bd33051989f05e73c883163d11669c2290 100644 (file)
@@ -54,6 +54,12 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form {
         'subject' => [
           'title' => ts('Subject'),
         ],
+        'from_name' => [
+          'title' => ts('Sender Name'),
+        ],
+        'from_email' => [
+          'title' => ts('Sender Email'),
+        ],
       ],
       'filters' => [
         'is_completed' => [
index 8f87fa5a1402fc1b4607aae28cf50860be450bd6..3aa49ab0a6da3128f2b2fca659004cfdc6946ac8 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/SMS/Provider.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b512d0ed25ec37b9c890952e48c667e6)
+ * (GenCodeChecksum:6ecda65bd52b36e04764cec8ee81e1b8)
  */
 
 /**
  * Database access object for the Provider entity.
  */
 class CRM_SMS_DAO_Provider extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '4.2';
 
   /**
    * Static instance to hold the table name.
index 6eb65bf70d3f7092ab6983565eb6d95ecdaaaf76..2ab3c1c7e8d87d909d729d1638c3e331336e53e9 100644 (file)
@@ -286,19 +286,6 @@ SET    version = '$version'
     return FALSE;
   }
 
-  /**
-   * @param $version
-   *
-   * @return bool
-   */
-  public function checkVersion($version) {
-    $domainID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain',
-      $version, 'id',
-      'version'
-    );
-    return (bool) $domainID;
-  }
-
   /**
    * @return array
    * @throws Exception
diff --git a/CRM/Upgrade/Incremental/php/FiveThirty.php b/CRM/Upgrade/Incremental/php/FiveThirty.php
new file mode 100644 (file)
index 0000000..1f8367d
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved.                        |
+ |                                                                    |
+ | This work is published under the GNU AGPLv3 license with some      |
+ | permitted exceptions and without any warranty. For full license    |
+ | and copyright information, see https://civicrm.org/licensing       |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * Upgrade logic for FiveThirty */
+class CRM_Upgrade_Incremental_php_FiveThirty extends CRM_Upgrade_Incremental_Base {
+
+  /**
+   * Compute any messages which should be displayed beforeupgrade.
+   *
+   * Note: This function is called iteratively for each upcoming
+   * revision to the database.
+   *
+   * @param string $preUpgradeMessage
+   * @param string $rev
+   *   a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
+   * @param null $currentVer
+   */
+  public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
+    // Example: Generate a pre-upgrade message.
+    // if ($rev == '5.12.34') {
+    //   $preUpgradeMessage .= '<p>' . ts('A new permission, "%1", has been added. This permission is now used to control access to the Manage Tags screen.', array(1 => ts('manage tags'))) . '</p>';
+    // }
+  }
+
+  /**
+   * Compute any messages which should be displayed after upgrade.
+   *
+   * @param string $postUpgradeMessage
+   *   alterable.
+   * @param string $rev
+   *   an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
+   */
+  public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
+    // Example: Generate a post-upgrade message.
+    // if ($rev == '5.12.34') {
+    //   $postUpgradeMessage .= '<br /><br />' . ts("By default, CiviCRM now disables the ability to import directly from SQL. To use this feature, you must explicitly grant permission 'import SQL datasource'.");
+    // }
+  }
+
+  /*
+   * Important! All upgrade functions MUST add a 'runSql' task.
+   * Uncomment and use the following template for a new upgrade version
+   * (change the x in the function name):
+   */
+
+  //  /**
+  //   * Upgrade function.
+  //   *
+  //   * @param string $rev
+  //   */
+  //  public function upgrade_5_0_x($rev) {
+  //    $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
+  //    $this->addTask('Do the foo change', 'taskFoo', ...);
+  //    // Additional tasks here...
+  //    // Note: do not use ts() in the addTask description because it adds unnecessary strings to transifex.
+  //    // The above is an exception because 'Upgrade DB to %1: SQL' is generic & reusable.
+  //  }
+
+  // public static function taskFoo(CRM_Queue_TaskContext $ctx, ...) {
+  //   return TRUE;
+  // }
+
+}
diff --git a/CRM/Upgrade/Incremental/sql/5.30.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.30.alpha1.mysql.tpl
new file mode 100644 (file)
index 0000000..4f70e19
--- /dev/null
@@ -0,0 +1 @@
+{* file to handle db changes in 5.30.alpha1 during upgrade *}
index 37a7171cab4373bd647129b919c41741f43a02da..2f57004adeac08cab6f600a86befab37e61c55f3 100644 (file)
@@ -28,15 +28,9 @@ abstract class CRM_Utils_Check_Component {
    */
   public function getChecksConfig() {
     if (!isset(Civi::$statics[__FUNCTION__])) {
-      // TODO: Remove this check when MINIMUM_UPGRADABLE_VERSION goes to 4.7.
-      if (CRM_Utils_System::version() !== CRM_Core_BAO_Domain::version() && !CRM_Core_DAO::checkTableExists('civicrm_status_pref')) {
-        Civi::$statics[__FUNCTION__] = [];
-      }
-      else {
-        Civi::$statics[__FUNCTION__] = (array) StatusPreference::get(FALSE)
-          ->addWhere('domain_id', '=', 'current_domain')
-          ->execute()->indexBy('name');
-      }
+      Civi::$statics[__FUNCTION__] = (array) StatusPreference::get(FALSE)
+        ->addWhere('domain_id', '=', 'current_domain')
+        ->execute()->indexBy('name');
     }
     return Civi::$statics[__FUNCTION__];
   }
index 94f51db49d9da3899c647c2fd12a9e9edcfe2372..e0a7d51d7b308c53d5b2ad7638ef50c376737b18 100644 (file)
@@ -246,32 +246,25 @@ class CRM_Utils_Check_Message {
    * @throws \CiviCRM_API3_Exception
    */
   private function checkStatusPreference() {
-    // TODO: Remove this check when MINIMUM_UPGRADABLE_VERSION goes to 4.7.
-    if (CRM_Utils_System::version() !== CRM_Core_BAO_Domain::version() && !CRM_Core_DAO::checkTableExists('civicrm_status_pref')) {
-      return FALSE;
-    }
-
     $this->hiddenUntil = FALSE;
     // Debug & info can't be hidden
     if ($this->level < 2) {
       return FALSE;
     }
-    $statusPreferenceParams = [
-      'name' => $this->getName(),
-      'domain_id' => CRM_Core_Config::domainID(),
-      'sequential' => 1,
+    $where = [
+      ['name', '=', $this->getName()],
+      ['domain_id', '=', CRM_Core_Config::domainID()],
     ];
     // Check if there's a StatusPreference matching this name/domain.
-    $statusPreference = civicrm_api3('StatusPreference', 'get', $statusPreferenceParams);
-    $prefs = CRM_Utils_Array::value('values', $statusPreference, []);
-    if ($prefs) {
+    $pref = civicrm_api4('StatusPreference', 'get', ['checkPermissions' => FALSE, 'where' => $where])->first();
+    if ($pref) {
       // If so, compare severity to StatusPreference->severity.
-      if ($this->level <= $prefs[0]['ignore_severity']) {
-        if (isset($prefs[0]['hush_until'])) {
+      if ($this->level <= $pref['ignore_severity']) {
+        if (isset($pref['hush_until'])) {
           // Time-based hush.
-          $this->hiddenUntil = $prefs[0]['hush_until'];
+          $this->hiddenUntil = $pref['hush_until'];
           $today = new DateTime();
-          $snoozeDate = new DateTime($prefs[0]['hush_until']);
+          $snoozeDate = new DateTime($pref['hush_until']);
           return !($today > $snoozeDate);
         }
         else {
index 70e1c5a26ed30a9c71bfd8ee43047114e45d3f14..1cd1dc02b6e70e3c8139fcbf5696da1e5576553b 100644 (file)
@@ -168,4 +168,21 @@ class CRM_Utils_SQL {
     return CRM_Core_DAO::singleValueQuery('SELECT VERSION()');
   }
 
+  /**
+   * Does the DSN indicate the connection should use ssl.
+   *
+   * @param string $dsn
+   *
+   * @return bool
+   */
+  public static function isSSLDSN(string $dsn):bool {
+    // Note that ssl= below is not an official PEAR::DB option. It doesn't know
+    // what to do with it. We made it up because it's not required
+    // to have client-side certificates to use ssl, so here you can specify
+    // you want that by putting ssl=1 in the DSN string.
+    //
+    // Cast to bool in case of error which we interpret as no ssl.
+    return (bool) preg_match('/[\?&](key|cert|ca|capath|cipher|ssl)=/', $dsn);
+  }
+
 }
index cedef4ca0d458ca83af785ebf097b81633d5dc58..b3bdb7fe545801ea63a8b080f1f6373301d84bd3 100644 (file)
@@ -717,15 +717,12 @@ class CRM_Utils_System {
      * process typically done in CLI and cron scripts. See: CRM-12648
      *
      * Q: Can we move this to the userSystem class so that it can be tuned
-     * per-CMS? For example, when dealing with UnitTests UF, there's no
-     * userFrameworkDSN.
+     * per-CMS? For example, when dealing with UnitTests UF, does it need to
+     * do this session write since the original issue was for Drupal.
      */
     $session = CRM_Core_Session::singleton();
     $session->set('civicrmInitSession', TRUE);
 
-    if ($config->userFrameworkDSN) {
-      $dbDrupal = DB::connect($config->userFrameworkDSN);
-    }
     return $config->userSystem->authenticate($name, $password, $loadCMSBootstrap, $realPath);
   }
 
index 9ad1d54adc352ba4c9d2ccbdc7450ed0eb6c084c..d6a3f10eea2aaa74fa61909ef07634ef8711a0fb 100644 (file)
@@ -85,6 +85,13 @@ class DAOGetAction extends AbstractGetAction {
   protected $having = [];
 
   public function _run(Result $result) {
+    // Early return if table doesn't exist yet due to pending upgrade
+    $baoName = $this->getBaoName();
+    if (!$baoName::tableHasBeenAdded()) {
+      \Civi::log()->warning("Could not read from {$this->getEntityName()} before table has been added. Upgrade required.", ['civi.tag' => 'upgrade_needed']);
+      return;
+    }
+
     $this->setDefaultWhereClause();
     $this->expandSelectClauseWildcards();
     $this->getObjects($result);
index 78065d55f355ef47c40a163d93690a6ae2f77504..acf2bd70a4088e0094eea14d5c2b9c451a68852d 100644 (file)
@@ -106,4 +106,11 @@ trait CustomValueActionTrait {
     return $this->customGroup;
   }
 
+  /**
+   * @return \CRM_Core_DAO|string
+   */
+  protected function getBaoName() {
+    return \CRM_Core_BAO_CustomValue::class;
+  }
+
 }
index 0dca04e3bc463cacd76b7bbb8280a0dd5ddb7a74..41750691c61c750370d9a06e2caa3b461a386f6f 100644 (file)
@@ -72,7 +72,9 @@
         {name: 'ang2', label: ts('Batch Calls'), code: ''}
       ],
       cli: [
-        {name: 'cv', label: ts('CV'), code: ''}
+        {name: 'short', label: ts('CV (short)'), code: ''},
+        {name: 'long', label: ts('CV (long)'), code: ''},
+        {name: 'pipe', label: ts('CV (pipe)'), code: ''}
       ]
     };
 
       }
       // Then lookup implicit links
       _.each(path, function(node) {
-        entity = _.find(links[entity], {alias: node}).entity;
+        var link = _.find(links[entity], {alias: node});
+        if (!link) {
+          return false;
+        }
+        entity = link.entity;
       });
       return entity;
     }
             break;
 
           case 'cli':
-            // Write cli code
-            code.cv = 'cv api4 ' + entity + '.' + action + " '" + stringify(params) + "'";
+            // Cli code using json input
+            code.long = 'cv api4 ' + entity + '.' + action + ' ' + cliFormat(JSON.stringify(params));
+            code.pipe = 'echo ' + cliFormat(JSON.stringify(params)) + ' | cv api4 ' + entity + '.' + action + ' --in=json';
+
+            // Cli code using short syntax
+            code.short = 'cv api4 ' + entity + '.' + action;
+            var limitSet = false;
+            _.each(params, function(param, key) {
+              switch (true) {
+                case (key === 'select' && !_.includes(param.join(), ' ')):
+                  code.short += ' +s ' + cliFormat(param.join(','));
+                  break;
+                case (key === 'where' && !_.intersection(_.map(param, 0), ['AND', 'OR', 'NOT']).length):
+                  _.each(param, function(clause) {
+                    code.short += ' +w ' + cliFormat(clause[0] + ' ' + clause[1] + (clause.length > 2 ? (' ' + JSON.stringify(clause[2])) : ''));
+                  });
+                  break;
+                case (key === 'orderBy'):
+                  _.each(param, function(dir, field) {
+                    code.short += ' +o ' + cliFormat(field + ' ' + dir);
+                  });
+                  break;
+                case (key === 'values'):
+                  _.each(param, function(val, field) {
+                    code.short += ' +v ' + cliFormat(field + '=' + val);
+                  });
+                  break;
+                case (key === 'limit' || key === 'offset'):
+                  // These 2 get combined
+                  if (!limitSet) {
+                    limitSet = true;
+                    code.short += ' +l ' + (params.limit || '0') + (params.offset ? ('@' + params.offset) : '');
+                  }
+                  break;
+                default:
+                  code.short += ' ' + key + '=' + (typeof param === 'string' ? cliFormat(param) : cliFormat(JSON.stringify(param)));
+              }
+            });
         }
       }
       _.each($scope.code, function(vals) {
       return JSON.stringify(val).replace(/\$/g, '\\$');
     }
 
+    // Format string to be cli-input-safe
+    function cliFormat(str) {
+      if (!_.includes(str, ' ') && !_.includes(str, '"') && !_.includes(str, "'")) {
+        return str;
+      }
+      if (!_.includes(str, "'")) {
+        return "'" + str + "'";
+      }
+      if (!_.includes(str, '"')) {
+        return '"' + str + '"';
+      }
+      return "'" + str.replace(/'/g, "\\'") + "'";
+    }
+
     function fetchMeta() {
       crmApi4(getMetaParams)
         .then(function(data) {
index 50268a400c1dba09291521f5b25adef03a2aa0ea..799dc7803197063a0168e80510ee71eb7e020659 100644 (file)
@@ -1221,7 +1221,7 @@ function formatCheckBoxField(&$checkboxFieldValue, $customFieldLabel, $entity) {
 /**
  * Function to do a 'standard' api get - when the api is only doing a $bao->find then use this.
  *
- * @param string $bao_name
+ * @param string|CRM_Core_DAO $bao_name
  *   Name of BAO.
  * @param array $params
  *   Params from api.
@@ -1240,20 +1240,27 @@ function _civicrm_api3_basic_get($bao_name, $params, $returnAsSuccess = TRUE, $e
   $entity = $entity ?: CRM_Core_DAO_AllCoreTables::getBriefName($bao_name);
   $options = _civicrm_api3_get_options_from_params($params);
 
-  $query = new \Civi\API\Api3SelectQuery($entity, CRM_Utils_Array::value('check_permissions', $params, FALSE));
-  $query->where = $params;
-  if ($options['is_count']) {
-    $query->select = ['count_rows'];
+  // Skip query if table doesn't exist yet due to pending upgrade
+  if (!$bao_name::tableHasBeenAdded()) {
+    \Civi::log()->warning("Could not read from {$entity} before table has been added. Upgrade required.", ['civi.tag' => 'upgrade_needed']);
+    $result = [];
   }
   else {
-    $query->select = array_keys(array_filter($options['return']));
-    $query->orderBy = $options['sort'];
-    $query->isFillUniqueFields = $uniqueFields;
-  }
-  $query->limit = $options['limit'];
-  $query->offset = $options['offset'];
-  $query->merge($sql);
-  $result = $query->run();
+    $query = new \Civi\API\Api3SelectQuery($entity, $params['check_permissions'] ?? FALSE);
+    $query->where = $params;
+    if ($options['is_count']) {
+      $query->select = ['count_rows'];
+    }
+    else {
+      $query->select = array_keys(array_filter($options['return']));
+      $query->orderBy = $options['sort'];
+      $query->isFillUniqueFields = $uniqueFields;
+    }
+    $query->limit = $options['limit'];
+    $query->offset = $options['offset'];
+    $query->merge($sql);
+    $result = $query->run();
+  }
 
   if ($returnAsSuccess) {
     return civicrm_api3_create_success($result, $params, $entity, 'get');
index 0a737c6dd99edbeffd7ee266201a53becf06eaba..9dfefaa375a7725c4e1b1933a20c09efec8ddf0f 100644 (file)
@@ -78,7 +78,8 @@
     "typo3/phar-stream-wrapper": "^2 || ^3.0",
     "brick/money": "~0.4",
     "ext-intl": "*",
-    "pear/mail_mime": "~1.10"
+    "pear/mail_mime": "~1.10",
+    "pear/db": "1.10"
   },
   "scripts": {
     "post-install-cmd": [
       "electrolinux/phpquery": {
         "PHP7.4 Fix for array access using {} instead of []": "https://raw.githubusercontent.com/civicrm/civicrm-core/fe45bdfc4f3e3d3deb27e3d853cdbc7f616620a9/tools/scripts/composer/patches/php74_array_access_fix_phpquery.patch"
       },
+      "pear/db": {
+        "Apply CiviCRM Customisations for the pear:db package": "https://raw.githubusercontent.com/civicrm/civicrm-core/a48a43c2b5f6d694fff1cfb99d522c5d9e2459a0/tools/scripts/composer/pear_db_civicrm_changes.patch"
+      },
       "pear/mail": {
         "Apply CiviCRM Customisations for CRM-1367 and CRM-5946": "https://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch"
       },
index e39dd5c9d291df339edfa687979e2f0342a01a01..44f39034684af8fe059b3ccc171784276190478f 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "1ff9c045fb03756148c0c66562aa61fd",
+    "content-hash": "46e891da51f0683373d9a6e62fb6f868",
     "packages": [
         {
             "name": "adrienrn/php-mimetyper",
             "description": "More info available on: http://pear.php.net/package/Console_Getopt",
             "time": "2015-07-20T20:28:12+00:00"
         },
+        {
+            "name": "pear/db",
+            "version": "v1.10.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/pear/DB.git",
+                "reference": "e158c3a48246b67cd8c95856ffbb93de4ef380fe"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/pear/DB/zipball/e158c3a48246b67cd8c95856ffbb93de4ef380fe",
+                "reference": "e158c3a48246b67cd8c95856ffbb93de4ef380fe",
+                "shasum": ""
+            },
+            "require": {
+                "pear/pear-core-minimal": "*"
+            },
+            "type": "library",
+            "extra": {
+                "patches_applied": {
+                    "Apply CiviCRM Customisations for the pear:db package": "https://raw.githubusercontent.com/civicrm/civicrm-core/a48a43c2b5f6d694fff1cfb99d522c5d9e2459a0/tools/scripts/composer/pear_db_civicrm_changes.patch"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "DB": "./"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                "./"
+            ],
+            "license": [
+                "PHP License v3.01"
+            ],
+            "authors": [
+                {
+                    "name": "Daniel Convissor",
+                    "email": "danielc@php.net",
+                    "role": "Lead"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net",
+                    "role": "Lead"
+                },
+                {
+                    "name": "Stig Bakken",
+                    "email": "stig@php.net",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Tomas V.V.Cox",
+                    "email": "cox@idecnet.com",
+                    "role": "Developer"
+                }
+            ],
+            "description": "More info available on: http://pear.php.net/package/DB",
+            "time": "2020-04-19T19:45:59+00:00"
+        },
         {
             "name": "pear/log",
             "version": "1.13.2",
index 3ca22852815a1208ceea95682a9175ad2f57c21c..bff2b8adb04743beb59f6a111bae0d1286561d1c 100644 (file)
@@ -19,14 +19,7 @@ class CRM_Event_Cart_StateMachine_Checkout extends CRM_Core_StateMachine {
     }
 
     $pages = [];
-    $is_monetary = FALSE;
-    $is_conference = FALSE;
-    foreach ($cart->events_in_carts as $event_in_cart) {
-      if ($event_in_cart->event->is_monetary) {
-        $is_monetary = TRUE;
-      }
-    }
-    $pages["CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices"] = NULL;
+    $pages['CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices'] = NULL;
     foreach ($cart->events_in_carts as $event_in_cart) {
       if ($event_in_cart->is_parent_event()) {
         foreach ($event_in_cart->participants as $participant) {
index 1cb341a78dd5e284b09129bf0ddcbc15c5746011..111014800d61db376d64bbd4eea5b84f22dea26d 100644 (file)
@@ -399,7 +399,7 @@ UNLOCK TABLES;
 
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
-INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,'5.29.beta1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,'5.30.alpha1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
 /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
 UNLOCK TABLES;
 
index 81fa70dec24629825da2643e70687c23a0130182..fd4896bad472df8474a37c0781f53b6136e0a81e 100644 (file)
@@ -963,4 +963,4 @@ INSERT INTO civicrm_navigation
 VALUES
     ( @domainID, CONCAT('civicrm/report/instance/', @instanceID,'&reset=1'), 'Mailing Detail Report', 'Mailing Detail Report', 'administer CiviMail', 'OR', @reportlastID, '1', NULL, @instanceID+2 );
 UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID;
-UPDATE civicrm_domain SET version = '5.29.beta1';
+UPDATE civicrm_domain SET version = '5.30.alpha1';
index 86e23f57af2caeba63596c64373341d1854304e8..1301ac5b36370e22d39aca16f7d7672f7f3b832b 100644 (file)
@@ -95,7 +95,7 @@
       <p>
         {$form.add_activity_type_id.html}
         {if $hasAccessToAllCases} &nbsp;
-          {$form.timeline_id.html}{$form._qf_CaseView_next.html} &nbsp;
+          {$form.timeline_id.html}{*This CaseView_next button is hidden, but gets clicked by the onChange handler for timeline_id in CaseView.js*}{$form._qf_CaseView_next.html} &nbsp;
           {$form.report_id.html}
         {/if}
       </p>
 
         {if $mergeCases}
           <a href="#mergeCasesDialog" class="action-item no-popup crm-hover-button case-miniform"><i class="crm-i fa-compress" aria-hidden="true"></i> {ts}Merge Case{/ts}</a>
-          {$form._qf_CaseView_next_merge_case.html}
+          {*This CaseView_next_merge_case button is hidden, but gets clicked by javascript in CaseView.js when the mergeCasesDialog popup is saved.*}{$form._qf_CaseView_next_merge_case.html}
           <span id="mergeCasesDialog" class="hiddenElement">
             {$form.merge_case_id.html}
           </span>
index 657fb77251ff6781a1414af5a2fa01055dd8bc88..5564d23fa07e73b6b9d0bf75eb91d7891af3f077 100644 (file)
     {$form.financial_type_id.html|crmAddClass:twenty}
   </td>
   <td>
-    <label>{ts}Contribution Page{/ts}</label> <br />
+    <label>{$form.contribution_page_id.label}</label> <br />
     {$form.contribution_page_id.html|crmAddClass:twenty}
   </td>
 </tr>
index 46ed344835d7c5594701862e047c5dc55f7826e7..40e53f26e16546163fcdcc0d27cdabff9ff25bfa 100644 (file)
@@ -70,10 +70,10 @@ if (!defined('CIVICRM_UF')) {
  * If any of these contain a single quote or backslash, escape those characters with a backslash: \' and \\, respectively.
  *
  * Datasource (DSN) format:
- *      define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
+ *      define( 'CIVICRM_UF_DSN', 'mysqli://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
  */
 if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {
-  define( 'CIVICRM_UF_DSN'           , 'mysql://%%CMSdbUser%%:%%CMSdbPass%%@%%CMSdbHost%%/%%CMSdbName%%?new_link=true');
+  define( 'CIVICRM_UF_DSN'           , 'mysqli://%%CMSdbUser%%:%%CMSdbPass%%@%%CMSdbHost%%/%%CMSdbName%%?new_link=true');
 }
 
 // %%extraSettings%%
@@ -83,19 +83,19 @@ if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {
  *
  * Database URL (CIVICRM_DSN) for CiviCRM Data:
  * Database URL format:
- *      define( 'CIVICRM_DSN', 'mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
+ *      define( 'CIVICRM_DSN', 'mysqli://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
  *
  * Drupal and CiviCRM can share the same database, or can be installed into separate databases.
  * Backdrop CMS and CiviCRM can also share the same database, or can be installed into separate databases.
  *
  * EXAMPLE: Drupal/Backdrop and CiviCRM running in the same database...
  *      DB Name = cms, DB User = cms
- *      define( 'CIVICRM_DSN'         , 'mysql://cms:YOUR_PASSWORD@localhost/cms?new_link=true');
+ *      define( 'CIVICRM_DSN'         , 'mysqli://cms:YOUR_PASSWORD@localhost/cms?new_link=true');
  *
  * EXAMPLE: Drupal/Backdrop and CiviCRM running in separate databases...
  *      CMS DB Name = cms, DB User = cms
  *      CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm
- *      define( 'CIVICRM_DSN'         , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
+ *      define( 'CIVICRM_DSN'         , 'mysqli://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
  *
  * If your username, password, server or DB name contain a single quote or backslash, escape those characters
  * with a backslash: \' and \\, respectively.
@@ -106,7 +106,7 @@ if (!defined('CIVICRM_DSN')) {
     define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']);
   }
   else {
-    define('CIVICRM_DSN', 'mysql://%%dbUser%%:%%dbPass%%@%%dbHost%%/%%dbName%%?new_link=true');
+    define('CIVICRM_DSN', 'mysqli://%%dbUser%%:%%dbPass%%@%%dbHost%%/%%dbName%%?new_link=true');
   }
 }
 
@@ -432,6 +432,11 @@ if (!defined('CIVICRM_PSR16_STRICT')) {
  * configuration option, but wish to, for example, use fr_CA instead of the
  * default fr_FR (for French), set one or more of the constants below to an
  * appropriate regional value.
+ *
+ * Note that since 5.26.0 specifically https://github.com/civicrm/civicrm-core/pull/16700
+ * This generally doesn't get used by WordPress especially if using the Polylang plugin.
+ * The reason is that the WordPress implementation has been changed to get the full locale
+ * from the WordPress plugin rather than just the 2 string language code.
  */
 // define('CIVICRM_LANGUAGE_MAPPING_FR', 'fr_CA');
 // define('CIVICRM_LANGUAGE_MAPPING_EN', 'en_CA');
index 5f829c9a409cd47f779f2c5d87dfbe790108baad..e726e82524b4edbf93750c1448e2ca21881c802f 100644 (file)
@@ -66,19 +66,24 @@ class CRM_Contact_BAO_ContactType_ContactTypeTest extends CiviUnitTestCase {
     // check for type:Individual
     $result = CRM_Contact_BAO_ContactType::subTypes('Individual');
     $this->assertEquals(array_keys($this->getExpectedContactSubTypes('Individual')), $result);
+    $this->assertEquals($this->getExpectedContactSubTypes('Individual'), CRM_Contact_BAO_ContactType::subTypeInfo('Individual'));
 
     // check for type:Organization
     $result = CRM_Contact_BAO_ContactType::subTypes('Organization');
     $this->assertEquals(array_keys($this->getExpectedContactSubTypes('Organization')), $result);
+    $this->assertEquals($this->getExpectedContactSubTypes('Organization'), CRM_Contact_BAO_ContactType::subTypeInfo('Organization'));
 
     // check for type:Household
     $result = CRM_Contact_BAO_ContactType::subTypes('Household');
     $this->assertEquals(array_keys($this->getExpectedContactSubTypes('Household')), $result);
+    $this->assertEquals($this->getExpectedContactSubTypes('Household'), CRM_Contact_BAO_ContactType::subTypeInfo('Household'));
 
     // check for all contact types
     $result = CRM_Contact_BAO_ContactType::subTypes();
     $subtypes = array_keys($this->getExpectedAllSubtypes());
     $this->assertEquals(sort($subtypes), sort($result));
+    $this->assertEquals($this->getExpectedAllSubtypes(), CRM_Contact_BAO_ContactType::subTypeInfo());
+
   }
 
   /**
index ed008287ed75b5cc777abf9e9c12862cf04aab08..0523aab7d51e1da7ac7f4938839f07451700579b 100644 (file)
@@ -542,4 +542,17 @@ class CRM_Core_DAOTest extends CiviUnitTestCase {
     $this->assertArrayNotHasKey('api_key', $permissionedContactFields);
   }
 
+  public function testTableHasBeenAdded() {
+    // Hack a different db version
+    CRM_Core_BAO_Domain::getDomain()->version = '5.28.0';
+
+    // Table was added in 5.29
+    $this->assertFalse(CRM_Contact_DAO_RelationshipCache::tableHasBeenAdded());
+
+    // Remove domain version override:
+    CRM_Core_BAO_Domain::version(TRUE);
+
+    $this->assertTrue(CRM_Contact_DAO_RelationshipCache::tableHasBeenAdded());
+  }
+
 }
index 3ef5c7ef9b814536cedd848ef5815a0308fabef2..0959ad2af15f4d7c299e86e537deb1bfd76d739d 100644 (file)
@@ -17,12 +17,7 @@ use Civi\Payment\PropertyBag;
  */
 class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
 
-  use \Civi\Test\GuzzleTestTrait;
-
-  /**
-   * @var \CRM_Core_Payment_AuthorizeNet
-   */
-  protected $processor;
+  use CRM_Core_Payment_AuthorizeNetTrait;
 
   public function setUp() {
     parent::setUp();
@@ -44,44 +39,24 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
    * Test doing a one-off payment.
    *
    * @throws \Civi\Payment\Exception\PaymentProcessorException
+   * @throws \CiviCRM_API3_Exception
    */
   public function testSinglePayment() {
-    $this->createMockHandler([$this->getExpectedSinglePaymentResponse()]);
-    $this->setUpClientWithHistoryContainer();
-    $this->processor->setGuzzleClient($this->getGuzzleClient());
+    $this->setupMockHandler();
     $params = $this->getBillingParams();
     $params['amount'] = 5.24;
     $this->processor->doPayment($params);
     $this->assertEquals($this->getExpectedSinglePaymentRequest(), $this->getRequestBodies()[0]);
   }
 
-  /**
-   * Get the expected response from Authorize.net.
-   *
-   * @return string
-   */
-  public function getExpectedSinglePaymentResponse() {
-    return '"1","1","1","(TESTMODE) This transaction has been approved.","000000","P","0","","","5.24","CC","auth_capture","","John","O&#39;Connor","","","","","","","","","","","","","","","","","","","","","","","",""';
-  }
-
-  /**
-   *  Get the expected request from Authorize.net.
-   *
-   * @return string
-   */
-  public function getExpectedSinglePaymentRequest() {
-    return 'x_login=4y5BfuW7jm&x_tran_key=4cAmW927n8uLf5J8&x_email_customer=&x_first_name=John&x_last_name=O%27Connor&x_address=&x_city=&x_state=&x_zip=&x_country=&x_customer_ip=&x_email=&x_invoice_num=&x_amount=5.24&x_currency_code=&x_description=&x_cust_id=&x_relay_response=FALSE&x_delim_data=TRUE&x_delim_char=%2C&x_encap_char=%22&x_card_num=4444333322221111&x_card_code=123&x_exp_date=10%2F2022&x_test_request=TRUE';
-  }
-
   /**
    * Create a single post dated payment as a recurring transaction.
    *
    * Test works but not both due to some form of caching going on in the SmartySingleton
    */
   public function testCreateSingleNowDated() {
-    $this->createMockHandler([$this->getExpectedResponse()]);
-    $this->setUpClientWithHistoryContainer();
-    $this->processor->setGuzzleClient($this->getGuzzleClient());
+    $this->isRecur = TRUE;
+    $this->setupMockHandler();
     $firstName = 'John';
     $lastName = "O\'Connor";
     $nameParams = ['first_name' => 'John', 'last_name' => $lastName];
@@ -203,9 +178,8 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
    * Create a single post dated payment as a recurring transaction.
    */
   public function testCreateSinglePostDated() {
-    $this->createMockHandler([$this->getExpectedResponse()]);
-    $this->setUpClientWithHistoryContainer();
-    $this->processor->setGuzzleClient($this->getGuzzleClient());
+    $this->isRecur = TRUE;
+    $this->setupMockHandler();
     $start_date = date('Ymd', strtotime('+ 1 week'));
 
     $firstName = 'John';
@@ -329,7 +303,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
     );
 
     $response = $this->getResponseBodies();
-    $this->assertEquals($this->getExpectedResponse(), $response[0], 3);
+    $this->assertEquals($this->getExpectedRecurResponse(), $response[0], 3);
     $requests = $this->getRequestBodies();
     $this->assertEquals($this->getExpectedRequest($contactId, date('Y-m-d', strtotime($start_date)), 70.23, 3, 4007000000027, '2022-10'), $requests[0]);
   }
@@ -392,15 +366,6 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
 ';
   }
 
-  /**
-   * Get a successful response to setting up a recurring.
-   *
-   * @return string
-   */
-  public function getExpectedResponse() {
-    return '<?xml version="1.0" encoding="utf-8"?><ARBCreateSubscriptionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><refId>8d468ca1b1dd5c2b56c7</refId><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><subscriptionId>6632052</subscriptionId><profile><customerProfileId>1512023280</customerProfileId><customerPaymentProfileId>1512027350</customerPaymentProfileId></profile></ARBCreateSubscriptionResponse>';
-  }
-
   /**
    * Get some basic billing parameters.
    *
diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTrait.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTrait.php
new file mode 100644 (file)
index 0000000..87ff897
--- /dev/null
@@ -0,0 +1,75 @@
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved.                        |
+ |                                                                    |
+ | This work is published under the GNU AGPLv3 license with some      |
+ | permitted exceptions and without any warranty. For full license    |
+ | and copyright information, see https://civicrm.org/licensing       |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * Class CRM_Core_Payment_AuthorizeNetTest
+ * @group headless
+ */
+trait CRM_Core_Payment_AuthorizeNetTrait {
+  use \Civi\Test\GuzzleTestTrait;
+
+  /**
+   * @var \CRM_Core_Payment_AuthorizeNet
+   */
+  protected $processor;
+
+  /**
+   * Is this a recurring transaction.
+   *
+   * @var bool
+   */
+  protected $isRecur = FALSE;
+
+  /**
+   * Get the expected response from Authorize.net.
+   *
+   * @return string
+   */
+  public function getExpectedSinglePaymentResponse() {
+    return '"1","1","1","(TESTMODE) This transaction has been approved.","000000","P","0","","","5.24","CC","auth_capture","","John","O&#39;Connor","","","","","","","","","","","","","","","","","","","","","","","",""';
+  }
+
+  /**
+   *  Get the expected request from Authorize.net.
+   *
+   * @return string
+   */
+  public function getExpectedSinglePaymentRequest() {
+    return 'x_login=4y5BfuW7jm&x_tran_key=4cAmW927n8uLf5J8&x_email_customer=&x_first_name=John&x_last_name=O%27Connor&x_address=&x_city=&x_state=&x_zip=&x_country=&x_customer_ip=&x_email=&x_invoice_num=&x_amount=5.24&x_currency_code=&x_description=&x_cust_id=&x_relay_response=FALSE&x_delim_data=TRUE&x_delim_char=%2C&x_encap_char=%22&x_card_num=4444333322221111&x_card_code=123&x_exp_date=10%2F2022&x_test_request=TRUE';
+  }
+
+  /**
+   * Add a mock handler to the authorize.net processor for testing.
+   *
+   * @param int|null $id
+   *
+   * @throws \CiviCRM_API3_Exception
+   */
+  protected function setupMockHandler($id = NULL) {
+    if ($id) {
+      $this->processor = Civi\Payment\System::singleton()->getById($id);
+    }
+    $response = $this->isRecur ? $this->getExpectedRecurResponse() : $this->getExpectedSinglePaymentResponse();
+    $this->createMockHandler([$response]);
+    $this->setUpClientWithHistoryContainer();
+    $this->processor->setGuzzleClient($this->getGuzzleClient());
+  }
+
+  /**
+   * Get a successful response to setting up a recurring.
+   *
+   * @return string
+   */
+  public function getExpectedRecurResponse() {
+    return '<?xml version="1.0" encoding="utf-8"?><ARBCreateSubscriptionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><refId>8d468ca1b1dd5c2b56c7</refId><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><subscriptionId>6632052</subscriptionId><profile><customerProfileId>1512023280</customerProfileId><customerPaymentProfileId>1512027350</customerPaymentProfileId></profile></ARBCreateSubscriptionResponse>';
+  }
+
+}
index dd0eb83661bf4507aa3ca1bf828ad0df07907d36..b2359ed4f080350d9d315bc0cd2bec35de51ddd2 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Civi\Api4\OptionValue;
+
 /**
  * Class CRM_Core_DAOTest
  *
@@ -80,6 +82,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       'civicrm_case_activity',
       'civicrm_campaign',
     ]);
+    OptionValue::update()->addWhere('name', '=', 'Much Much longer than just phone')->setValues(['label' => 'Mobile'])->execute();
 
     if (!empty($this->locationTypes)) {
       $this->callAPISuccess('LocationType', 'delete', ['id' => $this->locationTypes['Whare Kai']['id']]);
@@ -277,6 +280,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       'Country' => 'Netherlands',
       'Phone' => '',
       'Phone Extension' => '',
+      'Phone Type ID' => '',
       'Phone Type' => '',
       'Email' => 'home@example.com',
       'On Hold' => 'No',
@@ -795,12 +799,16 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
    *
    * Less over the top complete than the im test.
    *
+   * @throws \API_Exception
    * @throws \CRM_Core_Exception
+   * @throws \Civi\API\Exception\UnauthorizedException
    * @throws \League\Csv\Exception
    */
   public function testExportPhoneData() {
     $this->contactIDs[] = $this->individualCreate();
     $this->contactIDs[] = $this->individualCreate();
+
+    OptionValue::update()->addWhere('name', '=', 'Mobile')->setValues(['label' => 'Much Much longer than just phone'])->execute();
     $locationTypes = ['Billing' => 'Billing', 'Home' => 'Home'];
     $phoneTypes = ['Mobile', 'Phone'];
     foreach ($this->contactIDs as $contactID) {
@@ -839,26 +847,29 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
     foreach (array_keys(array_merge($locationTypes, [' ' => ['Primary']])) as $locationType) {
       $locationTypeID = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_Phone', 'location_type_id', $locationType);
       $fields[] = ['name' => 'phone', 'location_type_id' => $locationTypeID];
+      $fields[] = ['name' => 'phone_type', 'location_type_id' => $locationTypeID];
       $fields[] = ['name' => 'phone_type_id', 'location_type_id' => $locationTypeID];
       foreach ($relationships as $contactID => $relationship) {
         $fields[] = ['name' => 'phone_type_id', 'relationship_type_id' => $relationship['relationship_type_id'], 'relationship_direction' => 'a_b', 'location_type_id' => $locationTypeID];
+        $fields[] = ['name' => 'phone_type', 'relationship_type_id' => $relationship['relationship_type_id'], 'relationship_direction' => 'a_b', 'location_type_id' => $locationTypeID];
       }
       foreach ($phoneTypes as $phoneType) {
         $phoneTypeID = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_Phone', 'phone_type_id', $phoneType);
         $fields[] = ['name' => 'phone', 'phone_type_id' => $phoneTypeID, 'location_type_id' => $locationTypeID];
         foreach ($relationships as $contactID => $relationship) {
           $fields[] = ['name' => 'phone_type_id', 'phone_type_id' => $phoneTypeID, 'relationship_type_id' => $relationship['relationship_type_id'], 'relationship_direction' => 'a_b', 'location_type_id' => $locationTypeID];
+          $fields[] = ['name' => 'phone_type', 'phone_type_id' => $phoneTypeID, 'relationship_type_id' => $relationship['relationship_type_id'], 'relationship_direction' => 'a_b', 'location_type_id' => $locationTypeID];
         }
       }
     }
 
     $this->doExportTest(['fields' => $fields, 'ids' => [$this->contactIDs[0]]]);
     foreach ($this->csv->getRecords() as $row) {
-      $this->assertEquals('BillingMobile3', $row['Billing-Phone-Mobile']);
+      $this->assertEquals('BillingMobile3', $row['Billing-Phone-Much Much longer than just phone']);
       $this->assertEquals('', $row['Billing-Phone-Phone']);
-      $this->assertEquals('Phone', $row['Spouse of-Phone Type']);
-      $this->assertEquals('Mobile', $row['Phone Type']);
-      $this->assertEquals('Mobile', $row['Billing-Phone Type']);
+      $this->assertEquals('Much Much longer than just phone', $row['Spouse of-Phone Type']);
+      $this->assertEquals('Much Much longer than just phone', $row['Phone Type']);
+      $this->assertEquals('Much Much longer than just phone', $row['Billing-Phone Type']);
     }
   }
 
@@ -1087,6 +1098,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       'Country' => 'Netherlands',
       'Phone' => '',
       'Phone Extension' => '',
+      'Phone Type ID' => '',
       'Phone Type' => '',
       'Email' => 'home@example.com',
       'On Hold' => 'No',
@@ -1556,6 +1568,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       'tags' => 1,
       'notes' => 1,
       'phone_type_id' => 1,
+      'phone_type' => 1,
     ];
     if (!$isContactMode) {
       unset($returnProperties['groups']);
@@ -2228,25 +2241,26 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       68 => 'Country',
       69 => 'Phone',
       70 => 'Phone Extension',
-      71 => 'Phone Type',
-      72 => 'Email',
-      73 => 'On Hold',
-      74 => 'Use for Bulk Mail',
-      75 => 'Signature Text',
-      76 => 'Signature Html',
-      77 => 'IM Provider',
-      78 => 'IM Screen Name',
-      79 => 'OpenID',
-      80 => 'World Region',
-      81 => 'Website',
-      82 => 'Group(s)',
-      83 => 'Tag(s)',
-      84 => 'Note(s)',
+      71 => 'Phone Type ID',
+      72 => 'Phone Type',
+      73 => 'Email',
+      74 => 'On Hold',
+      75 => 'Use for Bulk Mail',
+      76 => 'Signature Text',
+      77 => 'Signature Html',
+      78 => 'IM Provider',
+      79 => 'IM Screen Name',
+      80 => 'OpenID',
+      81 => 'World Region',
+      82 => 'Website',
+      83 => 'Group(s)',
+      84 => 'Tag(s)',
+      85 => 'Note(s)',
     ];
     if (!$isContactExport) {
-      unset($headers[82]);
       unset($headers[83]);
       unset($headers[84]);
+      unset($headers[85]);
     }
     return $headers;
   }
@@ -2532,6 +2546,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       'groups' => '`groups` text',
       'tags' => '`tags` text',
       'notes' => '`notes` text',
+      'phone_type' => '`phone_type` varchar(255)',
     ];
     if (!$isContactExport) {
       unset($columns['groups']);
diff --git a/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php b/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php
new file mode 100644 (file)
index 0000000..29b271c
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved.                        |
+ |                                                                    |
+ | This work is published under the GNU AGPLv3 license with some      |
+ | permitted exceptions and without any warranty. For full license    |
+ | and copyright information, see https://civicrm.org/licensing       |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ *  Test various payment forms.
+ *
+ * This class is intended to be a place to build out testing of various forms - with the
+ * hope being to ensure all payment forms are consistently tested and to refine
+ * helper functions into a trait that could be available to
+ * extensions for testing - notably the eventcart which ideally should interact with core
+ * through approved interfaces - ideally even in tests.
+ *
+ * An approved interface would sit in the Civi directory and would at minimum support some functions
+ * to support using our processors in tests so we are testing a broader swath than just Dummy.
+ * Currently Authorize.net is also testable (uses Guzzle). At some point PaypalPro & Std should also be testable
+ * - allowing us to easily check payment forms work with the core processors which cover a reasonable amount of the
+ * expectations held by non-core processors .
+ *
+ * Note that this tests eventcart but is not in eventcart because I want to be sure about whether the
+ * traits supporting it make sense before making them available to extensions.
+ */
+class CRM_Financial_Form_PaymentFormsTest extends CiviUnitTestCase {
+
+  use CRM_Core_Payment_AuthorizeNetTrait;
+
+  /**
+   * Generic test on event payment forms to make sure they submit without error with payment processing.
+   *
+   * @throws \CRM_Core_Exception
+   * @throws \CiviCRM_API3_Exception
+   */
+  public function testEventPaymentForms() {
+    $processors = [$this->paymentProcessorAuthorizeNetCreate(['is_test' => FALSE])];
+    $this->setupMockHandler($processors[0]);
+    $eventID = $this->eventCreatePaid([
+      'end_date' => '+ 1 month',
+      'registration_end_date' => '+ 1 month',
+      'payment_processor' => $processors,
+    ])['id'];
+    $this->createLoggedInUser();
+
+    $forms = [
+      'CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices' => [
+        'forms' => ['CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices', 'CRM_Event_Cart_Form_Checkout_Payment'],
+        'controller' => [],
+        'submitValues' => [
+          'event' => [$eventID => ['participant' => [1 => ['email' => 'bob@example.com']]]],
+          'event_' . $eventID . '_price_' . $this->_ids['price_field'][0] => $this->_ids['price_field_value'][0],
+        ],
+        'REQUEST' => [],
+      ],
+    ];
+    $genericParams = [
+      'credit_card_number' => 4111111111111111,
+      'processor_id' => $processors[0],
+      'cvv2' => '123',
+      'credit_card_exp_date' => [
+        'M' => '1',
+        'Y' => date('Y') + 1,
+      ],
+      'credit_card_type' => 'Visa',
+      'billing_contact_email' => 'bobby@example.com',
+      'billing_first_name' => 'John',
+      'billing_middle_name' => '',
+      'billing_last_name' => "O'Connor",
+      'billing_street_address-5' => '8 Hobbitton Road',
+      'billing_city-5' => 'The Shire',
+      'billing_state_province_id-5' => 1012,
+      'billing_postal_code-5' => 5010,
+      'billing_country_id-5' => 1228,
+    ];
+
+    $cart = CRM_Event_Cart_BAO_Cart::find_or_create_for_current_session();
+    $cart->add_event($eventID);
+
+    foreach ($forms as $values) {
+      $_REQUEST = $values['REQUEST'];
+      $qfKey = NULL;
+      foreach ($values['forms'] as $formName) {
+        $formValues = array_merge($genericParams, $values['submitValues'], ['qfKey' => $qfKey]);
+        $form = $this->getFormObject($formName, $formValues);
+        $form->preProcess();
+        $form->buildQuickForm();
+        $form->postProcess();
+        $qfKey = $form->controller->_key;
+      }
+      $this->callAPISuccessGetSingle('Participant', ['participant_status_id' => 'Registered']);
+      $request = explode('&', $this->getRequestBodies()[0]);
+      // This is stand in for now just to check a request happened. We can improve later.
+      $this->assertContains('x_card_num=4111111111111111', $request);
+    }
+  }
+
+}
index 2f427ee905993f7813f3c606bb7c5483074e8b8d..c579c87d26fc79804f9769c41bb8195cd28a4cfb 100644 (file)
@@ -40,7 +40,6 @@ class CRM_Mailing_Form_Task_AdhocMailingTest extends CiviUnitTestCase {
   public function testCreateHiddenGroupFromSearchBuilder() {
     $this->createLoggedInUser();
     $formValues = [
-      'qfKey' => 'dde96a85ddebb90fb66de44859404aeb_2077',
       'entryURL' => 'http://dmaster.local/civicrm/contact/search/builder?reset=1',
       'mapper' => [1 => [['Individual']]],
       'operator' => [1 => ['=']],
index 56f2416c4969a0c792670b44fa56e9ff5ef0fe2b..cc5e3679b2db0b5fed35f6db4cb4e8176ce514f8 100644 (file)
@@ -32,4 +32,40 @@ class CRM_Utils_SQLTest extends CiviUnitTestCase {
     }
   }
 
+  /**
+   * Test isSSLDSN
+   * @dataProvider dsnProvider
+   * @param string $input
+   * @param bool $expected
+   */
+  public function testIsSSLDSN(string $input, bool $expected) {
+    $this->assertSame($expected, CRM_Utils_SQL::isSSLDSN($input));
+  }
+
+  /**
+   * Data provider for testIsSSLDSN
+   * @return array
+   */
+  public function dsnProvider():array {
+    return [
+      ['', FALSE],
+      ['mysqli://user:pass@localhost/drupal', FALSE],
+      ['mysqli://user:pass@localhost:3306/drupal', FALSE],
+      ['mysql://user:pass@localhost:3306/drupal', FALSE],
+      ['mysql://user:pass@localhost:3306/drupal', FALSE],
+      ['mysql://user:pass@localhost:3306/drupal?new_link=true', FALSE],
+      ['mysqli://user:pass@localhost:3306/drupal?ssl', FALSE],
+      ['mysqli://user:pass@localhost:3306/drupal?ssl=1', TRUE],
+      ['mysqli://user:pass@localhost:3306/drupal?new_link=true&ssl=1', TRUE],
+      ['mysql://user:pass@localhost:3306/drupal?ssl=1', TRUE],
+      ['mysqli://user:pass@localhost:3306/drupal?ca=%2Ftmp%2Fcacert.crt', TRUE],
+      ['mysqli://user:pass@localhost/drupal?ca=%2Ftmp%2Fcacert.crt&cert=%2Ftmp%2Fcert.crt&key=%2Ftmp%2F', TRUE],
+      ['mysqli://user:pass@localhost/drupal?ca=%2Fpath%20with%20spaces%2Fcacert.crt', TRUE],
+      ['mysqli://user:pass@localhost:3306/drupal?cipher=aes', TRUE],
+      ['mysqli://user:pass@localhost:3306/drupal?capath=%2Ftmp', TRUE],
+      ['mysqli://user:pass@localhost:3306/drupal?cipher=aes&capath=%2Ftmp&food=banana', TRUE],
+      ['mysqli://user:pass@localhost:3306/drupal?food=banana&cipher=aes', TRUE],
+    ];
+  }
+
 }
index 34bba898b12081837f4ce15e08683c3003211c87..7d05958487b299cf091a58342da6186d23e51e29 100644 (file)
@@ -3234,9 +3234,22 @@ VALUES
    * @throws \CRM_Core_Exception
    */
   public function getFormObject($class, $formValues = [], $pageName = '') {
+    $_POST = $formValues;
     $form = new $class();
     $_SERVER['REQUEST_METHOD'] = 'GET';
-    $form->controller = new CRM_Core_Controller();
+    switch ($class) {
+      case 'CRM_Event_Cart_Form_Checkout_Payment':
+      case 'CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices':
+        $form->controller = new CRM_Event_Cart_Controller_Checkout();
+        break;
+
+      default:
+        $form->controller = new CRM_Core_Controller();
+    }
+    if (!$pageName) {
+      $formParts = explode('_', $class);
+      $pageName = array_pop($formParts);
+    }
     $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
     $_SESSION['_' . $form->controller->_name . '_container']['values'][$pageName] = $formValues;
     return $form;
index 462c40d1a71ed92702f1ff7cffb711469601a61a..004289557d364ec8cf19c29f072d56c35cd91c1d 100644 (file)
@@ -5,6 +5,7 @@
   <class>EntityBatch</class>
   <name>civicrm_entity_batch</name>
   <comment>Batch entities (Contributions, Participants, Contacts) to a batch.</comment>
+  <add>3.3</add>
   <field>
     <name>id</name>
     <title>EntityBatch ID</title>
index 246c55bd32abbbd2aa7b8a85fe9e649bd155b7e6..e98363baa93bef96f461dc69accb1d839003e198 100644 (file)
     </pseudoconstant>
     <html>
       <type>Select</type>
+      <label>Contribution Page</label>
     </html>
     <add>1.5</add>
   </field>
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 4dabdfcf85360bc34250dfa032618bc929092157..01edced71da31333ac359fc72116e729fe03d8f3 100644 (file)
@@ -5,6 +5,7 @@
   <class>Discount</class>
   <name>civicrm_discount</name>
   <comment>Stores discounts for events on the basis of date</comment>
+  <add>2.1</add>
   <log>true</log>
   <field>
     <name>id</name>
index e4b06ffd251ffa733c542ad22ee51874588ef856..cad60ba916fcc7beaf633a38fcb9c786426f36c5 100644 (file)
@@ -5,6 +5,7 @@
   <class>EntityFile</class>
   <name>civicrm_entity_file</name>
   <comment>Attaches (joins) uploaded files (images, documents, etc.) to entities (Contacts, Groups, Actions).</comment>
+  <add>1.5</add>
   <log>true</log>
   <field>
     <name>id</name>
index 1f3543dcf0a12ecc31b6cb2d5cd9095c8bee9bae..0fed7e7cf9ac854247074958e6ebb5d457b6258e 100644 (file)
@@ -5,6 +5,7 @@
   <class>EntityTag</class>
   <name>civicrm_entity_tag</name>
   <comment>Tag entities (Contacts, Groups, Actions) to categories.</comment>
+  <add>1.1</add>
   <log>true</log>
   <field>
     <name>id</name>
index 453c64db5f5eaf6523e62c34002408ffef1a10be..f2b95e247841300c7c127d48079f349ca8149225 100644 (file)
   </field>
   <field>
     <name>phone_type_id</name>
-    <title>Phone Type</title>
+    <title>Phone Type ID</title>
     <type>int unsigned</type>
     <export>true</export>
     <comment>Which type of phone does this number belongs.</comment>
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>
index 3a0c51e328a14abcd315670d808e7bdb143ceb06..87a3463531c9a096e0b7abfdcca99893207263ae 100644 (file)
@@ -7,12 +7,15 @@
  * {$generated}
  * (GenCodeChecksum:{$genCodeChecksum})
  */
-
+{$useHelper}
 /**
  * Database access object for the {$table.entity} entity.
  */
 class {$table.className} extends CRM_Core_DAO {ldelim}
 
+     const EXT = {$ext};
+     const TABLE_ADDED = '{$table.add}';
+
      /**
       * Static instance to hold the table name.
       *
@@ -60,7 +63,7 @@ class {$table.className} extends CRM_Core_DAO {ldelim}
      * Returns localized title of this entity.
      */
     public static function getEntityTitle() {ldelim}
-        return ts('{$table.title}');
+        return {$tsFunctionName}('{$table.title}');
     {rdelim}
 
 
index 9d816139c3bcb69c17a6afb0147edc4a4dc9ddc9..06ebf2f8ad8efc9834bc829e9f50d82dfb8538c0 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>5.29.beta1</version_no>
+  <version_no>5.30.alpha1</version_no>
 </version>