From baa02cd32d97e8e8eb00ae83e8bb0ae5925e2517 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 16 Jul 2018 08:39:46 -0400 Subject: [PATCH] Respect '0' as a default when generating DAOs --- CRM/ACL/DAO/ACL.php | 1 + CRM/Activity/DAO/Activity.php | 4 ++++ CRM/Campaign/DAO/Survey.php | 2 ++ CRM/Case/DAO/Case.php | 1 + CRM/Contact/DAO/Contact.php | 8 ++++++++ CRM/Contact/DAO/DashboardContact.php | 3 +++ CRM/Contact/DAO/Group.php | 2 ++ CRM/Contact/DAO/Relationship.php | 2 ++ CRM/Contribute/DAO/Contribution.php | 3 +++ CRM/Contribute/DAO/ContributionPage.php | 10 ++++++++++ CRM/Contribute/DAO/ContributionRecur.php | 3 +++ CRM/Contribute/DAO/ContributionSoft.php | 1 + CRM/Contribute/DAO/Premium.php | 1 + CRM/Core/DAO/ActionLog.php | 1 + CRM/Core/DAO/ActionSchedule.php | 4 ++++ CRM/Core/DAO/Address.php | 3 +++ CRM/Core/DAO/Country.php | 1 + CRM/Core/DAO/CustomField.php | 5 +++++ CRM/Core/DAO/CustomGroup.php | 4 ++++ CRM/Core/DAO/Dashboard.php | 2 ++ CRM/Core/DAO/Email.php | 4 ++++ CRM/Core/DAO/IM.php | 2 ++ CRM/Core/DAO/MessageTemplate.php | 1 + CRM/Core/DAO/OpenID.php | 2 ++ CRM/Core/DAO/OptionGroup.php | 1 + CRM/Core/DAO/OptionValue.php | 3 +++ CRM/Core/DAO/Persistent.php | 1 + CRM/Core/DAO/Phone.php | 2 ++ CRM/Core/DAO/PrevNextCache.php | 1 + CRM/Core/DAO/Tag.php | 2 ++ CRM/Core/DAO/UFField.php | 5 +++++ CRM/Core/DAO/UFGroup.php | 7 +++++++ CRM/Event/Cart/DAO/Cart.php | 1 + CRM/Event/DAO/Event.php | 16 ++++++++++++++++ CRM/Event/DAO/Participant.php | 2 ++ CRM/Financial/DAO/FinancialAccount.php | 2 ++ CRM/Financial/DAO/FinancialItem.php | 1 + CRM/Financial/DAO/FinancialTrxn.php | 1 + CRM/Mailing/DAO/Component.php | 1 + CRM/Mailing/DAO/Mailing.php | 3 +++ CRM/Mailing/DAO/MailingJob.php | 3 +++ CRM/Member/DAO/Membership.php | 2 ++ CRM/Member/DAO/MembershipBlock.php | 1 + CRM/Member/DAO/MembershipStatus.php | 1 + CRM/Member/DAO/MembershipType.php | 2 ++ CRM/PCP/DAO/PCP.php | 4 ++++ CRM/PCP/DAO/PCPBlock.php | 1 + CRM/Pledge/DAO/Pledge.php | 1 + CRM/Pledge/DAO/PledgeBlock.php | 3 +++ CRM/Pledge/DAO/PledgePayment.php | 1 + CRM/Price/DAO/PriceField.php | 1 + CRM/Price/DAO/PriceFieldValue.php | 1 + CRM/Price/DAO/PriceSet.php | 3 +++ CRM/Report/DAO/ReportInstance.php | 1 + CRM/SMS/DAO/Provider.php | 2 ++ xml/templates/dao.tpl | 2 +- 56 files changed, 147 insertions(+), 1 deletion(-) diff --git a/CRM/ACL/DAO/ACL.php b/CRM/ACL/DAO/ACL.php index 97e9f1c151fe..d5b37d89f3ae 100644 --- a/CRM/ACL/DAO/ACL.php +++ b/CRM/ACL/DAO/ACL.php @@ -168,6 +168,7 @@ public static function &fields() { 'title' => ts('Deny ACL?'), 'description' => 'Is this ACL entry Allow (0) or Deny (1) ?', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_acl', 'entity' => 'ACL', 'bao' => 'CRM_ACL_BAO_ACL', diff --git a/CRM/Activity/DAO/Activity.php b/CRM/Activity/DAO/Activity.php index c10f7d5b8816..bf8a0be61406 100644 --- a/CRM/Activity/DAO/Activity.php +++ b/CRM/Activity/DAO/Activity.php @@ -475,6 +475,7 @@ public static function &fields() { 'headerPattern' => '/(is.)?test(.activity)?/i', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', @@ -505,6 +506,7 @@ public static function &fields() { 'name' => 'is_auto', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Auto'), + 'default' => '0', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', @@ -575,6 +577,7 @@ public static function &fields() { 'headerPattern' => '/(activity.)?(trash|deleted)/i', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', @@ -651,6 +654,7 @@ public static function &fields() { 'headerPattern' => '/(activity.)?(star|favorite)/i', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', diff --git a/CRM/Campaign/DAO/Survey.php b/CRM/Campaign/DAO/Survey.php index ebb2c5275acf..935b3dda570c 100644 --- a/CRM/Campaign/DAO/Survey.php +++ b/CRM/Campaign/DAO/Survey.php @@ -349,6 +349,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Default Survey'), 'description' => 'Is this default survey?', + 'default' => '0', 'table_name' => 'civicrm_survey', 'entity' => 'Survey', 'bao' => 'CRM_Campaign_BAO_Survey', @@ -412,6 +413,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('No Email Verification'), 'description' => 'Bypass the email verification.', + 'default' => '0', 'table_name' => 'civicrm_survey', 'entity' => 'Survey', 'bao' => 'CRM_Campaign_BAO_Survey', diff --git a/CRM/Case/DAO/Case.php b/CRM/Case/DAO/Case.php index 514544ec04c3..b881d0400649 100644 --- a/CRM/Case/DAO/Case.php +++ b/CRM/Case/DAO/Case.php @@ -271,6 +271,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_case', 'entity' => 'Case', 'bao' => 'CRM_Case_BAO_Case', diff --git a/CRM/Contact/DAO/Contact.php b/CRM/Contact/DAO/Contact.php index 59e9108b7141..d7049145cb1a 100644 --- a/CRM/Contact/DAO/Contact.php +++ b/CRM/Contact/DAO/Contact.php @@ -487,6 +487,7 @@ public static function &fields() { 'headerPattern' => '/d(o )?(not )?(email)/i', 'dataPattern' => '/^\d{1,}$/', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -504,6 +505,7 @@ public static function &fields() { 'headerPattern' => '/d(o )?(not )?(call|phone)/i', 'dataPattern' => '/^\d{1,}$/', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -521,6 +523,7 @@ public static function &fields() { 'headerPattern' => '/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i', 'dataPattern' => '/^\d{1,}$/', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -538,6 +541,7 @@ public static function &fields() { 'headerPattern' => '/d(o )?(not )?(sms)/i', 'dataPattern' => '/^\d{1,}$/', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -555,6 +559,7 @@ public static function &fields() { 'headerPattern' => '/d(o )?(not )?(trade)/i', 'dataPattern' => '/^\d{1,}$/', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -574,6 +579,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -1218,6 +1224,7 @@ public static function &fields() { 'headerPattern' => '/i(s\s)?d(eceased)$/i', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -1367,6 +1374,7 @@ public static function &fields() { 'where' => 'civicrm_contact.is_deleted', 'headerPattern' => '', 'dataPattern' => '', + 'default' => '0', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', diff --git a/CRM/Contact/DAO/DashboardContact.php b/CRM/Contact/DAO/DashboardContact.php index e3eb9e07bd94..a6538b2c6997 100644 --- a/CRM/Contact/DAO/DashboardContact.php +++ b/CRM/Contact/DAO/DashboardContact.php @@ -139,6 +139,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Column No'), 'description' => 'column no for this widget', + 'default' => '0', 'table_name' => 'civicrm_dashboard_contact', 'entity' => 'DashboardContact', 'bao' => 'CRM_Contact_BAO_DashboardContact', @@ -149,6 +150,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Dashlet is Active?'), 'description' => 'Is this widget active?', + 'default' => '0', 'table_name' => 'civicrm_dashboard_contact', 'entity' => 'DashboardContact', 'bao' => 'CRM_Contact_BAO_DashboardContact', @@ -159,6 +161,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Order'), 'description' => 'Ordering of the widgets.', + 'default' => '0', 'table_name' => 'civicrm_dashboard_contact', 'entity' => 'DashboardContact', 'bao' => 'CRM_Contact_BAO_DashboardContact', diff --git a/CRM/Contact/DAO/Group.php b/CRM/Contact/DAO/Group.php index e1de1bb5f877..d0b22f0c7369 100644 --- a/CRM/Contact/DAO/Group.php +++ b/CRM/Contact/DAO/Group.php @@ -401,6 +401,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Group is Hidden'), 'description' => 'Is this group hidden?', + 'default' => '0', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', @@ -410,6 +411,7 @@ public static function &fields() { 'name' => 'is_reserved', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Group is Reserved'), + 'default' => '0', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', diff --git a/CRM/Contact/DAO/Relationship.php b/CRM/Contact/DAO/Relationship.php index f61c5c220fdb..c286e09ecfac 100644 --- a/CRM/Contact/DAO/Relationship.php +++ b/CRM/Contact/DAO/Relationship.php @@ -256,6 +256,7 @@ public static function &fields() { 'description' => 'is contact a has permission to view / edit contact and related data for contact b ? ', + 'default' => '0', 'table_name' => 'civicrm_relationship', 'entity' => 'Relationship', 'bao' => 'CRM_Contact_BAO_Relationship', @@ -271,6 +272,7 @@ public static function &fields() { 'description' => 'is contact b has permission to view / edit contact and related data for contact a ? ', + 'default' => '0', 'table_name' => 'civicrm_relationship', 'entity' => 'Relationship', 'bao' => 'CRM_Contact_BAO_Relationship', diff --git a/CRM/Contribute/DAO/Contribution.php b/CRM/Contribute/DAO/Contribution.php index 527cb61eb562..d92f6f7958f6 100644 --- a/CRM/Contribute/DAO/Contribution.php +++ b/CRM/Contribute/DAO/Contribution.php @@ -399,6 +399,7 @@ public static function &fields() { 'headerPattern' => '/non?.?deduct/i', 'dataPattern' => '/^\d+(\.\d{2})?$/', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contribution', 'entity' => 'Contribution', 'bao' => 'CRM_Contribute_BAO_Contribution', @@ -696,6 +697,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contribution', 'entity' => 'Contribution', 'bao' => 'CRM_Contribute_BAO_Contribution', @@ -713,6 +715,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contribution', 'entity' => 'Contribution', 'bao' => 'CRM_Contribute_BAO_Contribution', diff --git a/CRM/Contribute/DAO/ContributionPage.php b/CRM/Contribute/DAO/ContributionPage.php index ab08e950890a..98565ad90e42 100644 --- a/CRM/Contribute/DAO/ContributionPage.php +++ b/CRM/Contribute/DAO/ContributionPage.php @@ -458,6 +458,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Credit Card Only?'), 'description' => 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -479,6 +480,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Recurring'), 'description' => 'if true - allows recurring contributions, valid only for PayPal_Standard', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -521,6 +523,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Support Recurring Intervals'), 'description' => 'if true - supports recurring intervals', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -531,6 +534,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Recurring Installments?'), 'description' => 'if true - asks user for recurring installments', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -541,6 +545,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Adjust Recurring Start Date'), 'description' => 'if true - user is able to adjust payment start date', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -551,6 +556,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Pay Later'), 'description' => 'if true - allows the user to send payment directly to the org later', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -581,6 +587,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Allow Partial Payment'), 'description' => 'is partial payment enabled for this online contribution page', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -627,6 +634,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Allow Other Amounts'), 'description' => 'if true, page will include an input text field where user can enter their own amount', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -731,6 +739,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Send email Receipt'), 'description' => 'if true, receipt is automatically emailed to contact on success', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', @@ -930,6 +939,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is billing block required'), 'description' => 'if true - billing block is required for online contribution page', + 'default' => '0', 'table_name' => 'civicrm_contribution_page', 'entity' => 'ContributionPage', 'bao' => 'CRM_Contribute_BAO_ContributionPage', diff --git a/CRM/Contribute/DAO/ContributionRecur.php b/CRM/Contribute/DAO/ContributionRecur.php index 1f1650edad7d..c27f63c0044d 100644 --- a/CRM/Contribute/DAO/ContributionRecur.php +++ b/CRM/Contribute/DAO/ContributionRecur.php @@ -508,6 +508,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contribution_recur', 'entity' => 'ContributionRecur', 'bao' => 'CRM_Contribute_BAO_ContributionRecur', @@ -549,6 +550,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Number of Failures'), 'description' => 'Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.', + 'default' => '0', 'table_name' => 'civicrm_contribution_recur', 'entity' => 'ContributionRecur', 'bao' => 'CRM_Contribute_BAO_ContributionRecur', @@ -576,6 +578,7 @@ public static function &fields() { 'title' => ts('Auto Renew'), 'description' => 'Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_contribution_recur', 'entity' => 'ContributionRecur', 'bao' => 'CRM_Contribute_BAO_ContributionRecur', diff --git a/CRM/Contribute/DAO/ContributionSoft.php b/CRM/Contribute/DAO/ContributionSoft.php index 977a00bea708..88c9c47f0017 100644 --- a/CRM/Contribute/DAO/ContributionSoft.php +++ b/CRM/Contribute/DAO/ContributionSoft.php @@ -233,6 +233,7 @@ public static function &fields() { 'name' => 'pcp_display_in_roll', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Soft Contribution Display on PCP'), + 'default' => '0', 'table_name' => 'civicrm_contribution_soft', 'entity' => 'ContributionSoft', 'bao' => 'CRM_Contribute_BAO_ContributionSoft', diff --git a/CRM/Contribute/DAO/Premium.php b/CRM/Contribute/DAO/Premium.php index f8981352c930..9ff1e31b313b 100644 --- a/CRM/Contribute/DAO/Premium.php +++ b/CRM/Contribute/DAO/Premium.php @@ -169,6 +169,7 @@ public static function &fields() { 'title' => ts('Is Premium Active?'), 'description' => 'Is the Premiums feature enabled for this page?', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_premiums', 'entity' => 'Premium', 'bao' => 'CRM_Contribute_BAO_Premium', diff --git a/CRM/Core/DAO/ActionLog.php b/CRM/Core/DAO/ActionLog.php index 671e1542f8c7..3958e5ff22f7 100644 --- a/CRM/Core/DAO/ActionLog.php +++ b/CRM/Core/DAO/ActionLog.php @@ -200,6 +200,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Error?'), 'description' => 'Was there any error sending the reminder?', + 'default' => '0', 'table_name' => 'civicrm_action_log', 'entity' => 'ActionLog', 'bao' => 'CRM_Core_BAO_ActionLog', diff --git a/CRM/Core/DAO/ActionSchedule.php b/CRM/Core/DAO/ActionSchedule.php index 20d7fde9d3b6..c7ee8457f1ad 100644 --- a/CRM/Core/DAO/ActionSchedule.php +++ b/CRM/Core/DAO/ActionSchedule.php @@ -407,6 +407,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Start Action Offset'), 'description' => 'Reminder Interval.', + 'default' => '0', 'table_name' => 'civicrm_action_schedule', 'entity' => 'ActionSchedule', 'bao' => 'CRM_Core_BAO_ActionSchedule', @@ -458,6 +459,7 @@ public static function &fields() { 'name' => 'is_repeat', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Repeat?'), + 'default' => '0', 'table_name' => 'civicrm_action_schedule', 'entity' => 'ActionSchedule', 'bao' => 'CRM_Core_BAO_ActionSchedule', @@ -486,6 +488,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Repetition Frequency Interval'), 'description' => 'Time interval for repeating the reminder.', + 'default' => '0', 'table_name' => 'civicrm_action_schedule', 'entity' => 'ActionSchedule', 'bao' => 'CRM_Core_BAO_ActionSchedule', @@ -514,6 +517,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('End Frequency Interval'), 'description' => 'Time interval till repeating the reminder.', + 'default' => '0', 'table_name' => 'civicrm_action_schedule', 'entity' => 'ActionSchedule', 'bao' => 'CRM_Core_BAO_ActionSchedule', diff --git a/CRM/Core/DAO/Address.php b/CRM/Core/DAO/Address.php index de15258fbf23..877496a9d59f 100644 --- a/CRM/Core/DAO/Address.php +++ b/CRM/Core/DAO/Address.php @@ -311,6 +311,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Address Primary?'), 'description' => 'Is this the primary address.', + 'default' => '0', 'table_name' => 'civicrm_address', 'entity' => 'Address', 'bao' => 'CRM_Core_BAO_Address', @@ -324,6 +325,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Billing Address'), 'description' => 'Is this the billing address.', + 'default' => '0', 'table_name' => 'civicrm_address', 'entity' => 'Address', 'bao' => 'CRM_Core_BAO_Address', @@ -706,6 +708,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is manually geocoded'), 'description' => 'Is this a manually entered geo code', + 'default' => '0', 'table_name' => 'civicrm_address', 'entity' => 'Address', 'bao' => 'CRM_Core_BAO_Address', diff --git a/CRM/Core/DAO/Country.php b/CRM/Core/DAO/Country.php index 5823935f092f..82af44c6856b 100644 --- a/CRM/Core/DAO/Country.php +++ b/CRM/Core/DAO/Country.php @@ -227,6 +227,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Abbreviate Province?'), 'description' => 'Should state/province be displayed as abbreviation for contacts from this country?', + 'default' => '0', 'table_name' => 'civicrm_country', 'entity' => 'Country', 'bao' => 'CRM_Core_BAO_Country', diff --git a/CRM/Core/DAO/CustomField.php b/CRM/Core/DAO/CustomField.php index 24b86133fe26..fea2e7e4c7df 100644 --- a/CRM/Core/DAO/CustomField.php +++ b/CRM/Core/DAO/CustomField.php @@ -377,6 +377,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Custom Field Is Required?'), 'description' => 'Is a value required for this property.', + 'default' => '0', 'table_name' => 'civicrm_custom_field', 'entity' => 'CustomField', 'bao' => 'CRM_Core_BAO_CustomField', @@ -387,6 +388,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Allow Searching on Field?'), 'description' => 'Is this property searchable.', + 'default' => '0', 'table_name' => 'civicrm_custom_field', 'entity' => 'CustomField', 'bao' => 'CRM_Core_BAO_CustomField', @@ -397,6 +399,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Search as a Range'), 'description' => 'Is this property range searchable.', + 'default' => '0', 'table_name' => 'civicrm_custom_field', 'entity' => 'CustomField', 'bao' => 'CRM_Core_BAO_CustomField', @@ -486,6 +489,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Field is Viewable'), 'description' => 'Is this property set by PHP Code? A code field is viewable but not editable', + 'default' => '0', 'table_name' => 'civicrm_custom_field', 'entity' => 'CustomField', 'bao' => 'CRM_Core_BAO_CustomField', @@ -617,6 +621,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Field Display'), 'description' => 'Should the multi-record custom field values be displayed in tab table listing', + 'default' => '0', 'table_name' => 'civicrm_custom_field', 'entity' => 'CustomField', 'bao' => 'CRM_Core_BAO_CustomField', diff --git a/CRM/Core/DAO/CustomGroup.php b/CRM/Core/DAO/CustomGroup.php index 93d82140553e..9e014563bc5a 100644 --- a/CRM/Core/DAO/CustomGroup.php +++ b/CRM/Core/DAO/CustomGroup.php @@ -309,6 +309,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Collapse Custom Group?'), 'description' => 'Will this group be in collapsed or expanded mode on initial display ?', + 'default' => '0', 'table_name' => 'civicrm_custom_group', 'entity' => 'CustomGroup', 'bao' => 'CRM_Core_BAO_CustomGroup', @@ -384,6 +385,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Supports Multiple Records'), 'description' => 'Does this group hold multiple values?', + 'default' => '0', 'table_name' => 'civicrm_custom_group', 'entity' => 'CustomGroup', 'bao' => 'CRM_Core_BAO_CustomGroup', @@ -414,6 +416,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Collapse Group Display'), 'description' => 'Will this group be in collapsed or expanded mode on advanced search display ?', + 'default' => '0', 'table_name' => 'civicrm_custom_group', 'entity' => 'CustomGroup', 'bao' => 'CRM_Core_BAO_CustomGroup', @@ -445,6 +448,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Reserved Group?'), 'description' => 'Is this a reserved Custom Group?', + 'default' => '0', 'table_name' => 'civicrm_custom_group', 'entity' => 'CustomGroup', 'bao' => 'CRM_Core_BAO_CustomGroup', diff --git a/CRM/Core/DAO/Dashboard.php b/CRM/Core/DAO/Dashboard.php index 3974eab19e40..634e0f34124f 100644 --- a/CRM/Core/DAO/Dashboard.php +++ b/CRM/Core/DAO/Dashboard.php @@ -238,6 +238,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Dashlet Active?'), 'description' => 'Is this dashlet active?', + 'default' => '0', 'table_name' => 'civicrm_dashboard', 'entity' => 'Dashboard', 'bao' => 'CRM_Core_BAO_Dashboard', @@ -248,6 +249,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Dashlet Reserved?'), 'description' => 'Is this dashlet reserved?', + 'default' => '0', 'table_name' => 'civicrm_dashboard', 'entity' => 'Dashboard', 'bao' => 'CRM_Core_BAO_Dashboard', diff --git a/CRM/Core/DAO/Email.php b/CRM/Core/DAO/Email.php index 7abc05f434d1..9d7d24eba260 100644 --- a/CRM/Core/DAO/Email.php +++ b/CRM/Core/DAO/Email.php @@ -209,6 +209,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Primary email'), 'description' => 'Is this the primary?', + 'default' => '0', 'table_name' => 'civicrm_email', 'entity' => 'Email', 'bao' => 'CRM_Core_BAO_Email', @@ -219,6 +220,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Billing Email?'), 'description' => 'Is this the billing?', + 'default' => '0', 'table_name' => 'civicrm_email', 'entity' => 'Email', 'bao' => 'CRM_Core_BAO_Email', @@ -234,6 +236,7 @@ public static function &fields() { 'where' => 'civicrm_email.on_hold', 'headerPattern' => '', 'dataPattern' => '', + 'default' => '0', 'table_name' => 'civicrm_email', 'entity' => 'Email', 'bao' => 'CRM_Core_BAO_Email', @@ -252,6 +255,7 @@ public static function &fields() { 'where' => 'civicrm_email.is_bulkmail', 'headerPattern' => '', 'dataPattern' => '', + 'default' => '0', 'table_name' => 'civicrm_email', 'entity' => 'Email', 'bao' => 'CRM_Core_BAO_Email', diff --git a/CRM/Core/DAO/IM.php b/CRM/Core/DAO/IM.php index dcdf67f176d8..35a1b01d9eb3 100644 --- a/CRM/Core/DAO/IM.php +++ b/CRM/Core/DAO/IM.php @@ -190,6 +190,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is IM Primary?'), 'description' => 'Is this the primary IM for this contact and location.', + 'default' => '0', 'table_name' => 'civicrm_im', 'entity' => 'IM', 'bao' => 'CRM_Core_BAO_IM', @@ -200,6 +201,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is IM Billing?'), 'description' => 'Is this the billing?', + 'default' => '0', 'table_name' => 'civicrm_im', 'entity' => 'IM', 'bao' => 'CRM_Core_BAO_IM', diff --git a/CRM/Core/DAO/MessageTemplate.php b/CRM/Core/DAO/MessageTemplate.php index 93d2b0ec7ec3..90beadc0aac7 100644 --- a/CRM/Core/DAO/MessageTemplate.php +++ b/CRM/Core/DAO/MessageTemplate.php @@ -224,6 +224,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Message Template is used for SMS?'), 'description' => 'Is this message template used for sms?', + 'default' => '0', 'table_name' => 'civicrm_msg_template', 'entity' => 'MessageTemplate', 'bao' => 'CRM_Core_BAO_MessageTemplate', diff --git a/CRM/Core/DAO/OpenID.php b/CRM/Core/DAO/OpenID.php index 90569e58f069..0033e3f37e27 100644 --- a/CRM/Core/DAO/OpenID.php +++ b/CRM/Core/DAO/OpenID.php @@ -157,6 +157,7 @@ public static function &fields() { 'title' => ts('Allowed to login?'), 'description' => 'Whether or not this user is allowed to login', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_openid', 'entity' => 'OpenID', 'bao' => 'CRM_Core_BAO_OpenID', @@ -167,6 +168,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is OpenID Primary?'), 'description' => 'Is this the primary email for this contact and location.', + 'default' => '0', 'table_name' => 'civicrm_openid', 'entity' => 'OpenID', 'bao' => 'CRM_Core_BAO_OpenID', diff --git a/CRM/Core/DAO/OptionGroup.php b/CRM/Core/DAO/OptionGroup.php index 956b0104e0da..3f470ce1a5e3 100644 --- a/CRM/Core/DAO/OptionGroup.php +++ b/CRM/Core/DAO/OptionGroup.php @@ -193,6 +193,7 @@ public static function &fields() { 'title' => ts('Option Group Is Locked'), 'description' => 'A lock to remove the ability to add new options via the UI.', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_option_group', 'entity' => 'OptionGroup', 'bao' => 'CRM_Core_BAO_OptionGroup', diff --git a/CRM/Core/DAO/OptionValue.php b/CRM/Core/DAO/OptionValue.php index 1875c7521312..dbf7059bb182 100644 --- a/CRM/Core/DAO/OptionValue.php +++ b/CRM/Core/DAO/OptionValue.php @@ -286,6 +286,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Option is Default?'), 'description' => 'Is this the default option for the group?', + 'default' => '0', 'table_name' => 'civicrm_option_value', 'entity' => 'OptionValue', 'bao' => 'CRM_Core_BAO_OptionValue', @@ -322,6 +323,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Option is Header?'), 'description' => 'Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?', + 'default' => '0', 'table_name' => 'civicrm_option_value', 'entity' => 'OptionValue', 'bao' => 'CRM_Core_BAO_OptionValue', @@ -332,6 +334,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Option Is Reserved?'), 'description' => 'Is this a predefined system object?', + 'default' => '0', 'table_name' => 'civicrm_option_value', 'entity' => 'OptionValue', 'bao' => 'CRM_Core_BAO_OptionValue', diff --git a/CRM/Core/DAO/Persistent.php b/CRM/Core/DAO/Persistent.php index b6cdf47d6d46..43954d583fa3 100644 --- a/CRM/Core/DAO/Persistent.php +++ b/CRM/Core/DAO/Persistent.php @@ -132,6 +132,7 @@ public static function &fields() { 'title' => ts('Is Configuration?'), 'description' => 'Config Settings', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_persistent', 'entity' => 'Persistent', 'bao' => 'CRM_Core_BAO_Persistent', diff --git a/CRM/Core/DAO/Phone.php b/CRM/Core/DAO/Phone.php index 013b416c9405..034f0d54af1e 100644 --- a/CRM/Core/DAO/Phone.php +++ b/CRM/Core/DAO/Phone.php @@ -174,6 +174,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Phone Primary?'), 'description' => 'Is this the primary phone for this contact and location.', + 'default' => '0', 'table_name' => 'civicrm_phone', 'entity' => 'Phone', 'bao' => 'CRM_Core_BAO_Phone', @@ -184,6 +185,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Billing Phone'), 'description' => 'Is this the billing?', + 'default' => '0', 'table_name' => 'civicrm_phone', 'entity' => 'Phone', 'bao' => 'CRM_Core_BAO_Phone', diff --git a/CRM/Core/DAO/PrevNextCache.php b/CRM/Core/DAO/PrevNextCache.php index 26a8d9196069..bc01e75e1c94 100644 --- a/CRM/Core/DAO/PrevNextCache.php +++ b/CRM/Core/DAO/PrevNextCache.php @@ -160,6 +160,7 @@ public static function &fields() { 'name' => 'is_selected', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Selected'), + 'default' => '0', 'table_name' => 'civicrm_prevnext_cache', 'entity' => 'PrevNextCache', 'bao' => 'CRM_Core_BAO_PrevNextCache', diff --git a/CRM/Core/DAO/Tag.php b/CRM/Core/DAO/Tag.php index df103628dad0..14160e2496ff 100644 --- a/CRM/Core/DAO/Tag.php +++ b/CRM/Core/DAO/Tag.php @@ -194,6 +194,7 @@ public static function &fields() { 'name' => 'is_reserved', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Reserved'), + 'default' => '0', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', @@ -203,6 +204,7 @@ public static function &fields() { 'name' => 'is_tagset', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Tagset'), + 'default' => '0', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', diff --git a/CRM/Core/DAO/UFField.php b/CRM/Core/DAO/UFField.php index bd5a61dab55b..b560e442ed36 100644 --- a/CRM/Core/DAO/UFField.php +++ b/CRM/Core/DAO/UFField.php @@ -253,6 +253,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Profile Is View Only'), 'description' => 'the field is view only and not editable in user forms.', + 'default' => '0', 'table_name' => 'civicrm_uf_field', 'entity' => 'UFField', 'bao' => 'CRM_Core_BAO_UFField', @@ -263,6 +264,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Profile Field Is Required'), 'description' => 'Is this field required when included in a user or registration form?', + 'default' => '0', 'table_name' => 'civicrm_uf_field', 'entity' => 'UFField', 'bao' => 'CRM_Core_BAO_UFField', @@ -324,6 +326,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Profile Field Is a Filter'), 'description' => 'Is this field included as a column in the selector table?', + 'default' => '0', 'table_name' => 'civicrm_uf_field', 'entity' => 'UFField', 'bao' => 'CRM_Core_BAO_UFField', @@ -334,6 +337,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Profile Field Is Searchable'), 'description' => 'Is this field included search form of profile?', + 'default' => '0', 'table_name' => 'civicrm_uf_field', 'entity' => 'UFField', 'bao' => 'CRM_Core_BAO_UFField', @@ -410,6 +414,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Profile Field Supports Multiple'), 'description' => 'Include in multi-record listing?', + 'default' => '0', 'table_name' => 'civicrm_uf_field', 'entity' => 'UFField', 'bao' => 'CRM_Core_BAO_UFField', diff --git a/CRM/Core/DAO/UFGroup.php b/CRM/Core/DAO/UFGroup.php index 53e1c18927df..6605de613caa 100644 --- a/CRM/Core/DAO/UFGroup.php +++ b/CRM/Core/DAO/UFGroup.php @@ -397,6 +397,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Show Captcha On Profile'), 'description' => 'Should a CAPTCHA widget be included this Profile form.', + 'default' => '0', 'table_name' => 'civicrm_uf_group', 'entity' => 'UFGroup', 'bao' => 'CRM_Core_BAO_UFGroup', @@ -407,6 +408,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Map Profile'), 'description' => 'Do we want to map results from this profile.', + 'default' => '0', 'table_name' => 'civicrm_uf_group', 'entity' => 'UFGroup', 'bao' => 'CRM_Core_BAO_UFGroup', @@ -417,6 +419,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Show Edit Link?'), 'description' => 'Should edit link display in profile selector', + 'default' => '0', 'table_name' => 'civicrm_uf_group', 'entity' => 'UFGroup', 'bao' => 'CRM_Core_BAO_UFGroup', @@ -427,6 +430,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Show Link to CMS User'), 'description' => 'Should we display a link to the website profile in profile selector', + 'default' => '0', 'table_name' => 'civicrm_uf_group', 'entity' => 'UFGroup', 'bao' => 'CRM_Core_BAO_UFGroup', @@ -437,6 +441,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Update on Duplicate'), 'description' => 'Should we update the contact record if we find a duplicate', + 'default' => '0', 'table_name' => 'civicrm_uf_group', 'entity' => 'UFGroup', 'bao' => 'CRM_Core_BAO_UFGroup', @@ -459,6 +464,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Create CMS User?'), 'description' => 'Should we create a cms user for this profile ', + 'default' => '0', 'table_name' => 'civicrm_uf_group', 'entity' => 'UFGroup', 'bao' => 'CRM_Core_BAO_UFGroup', @@ -521,6 +527,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Include Proximity Search?'), 'description' => 'Should we include proximity search feature in this profile search form?', + 'default' => '0', 'table_name' => 'civicrm_uf_group', 'entity' => 'UFGroup', 'bao' => 'CRM_Core_BAO_UFGroup', diff --git a/CRM/Event/Cart/DAO/Cart.php b/CRM/Event/Cart/DAO/Cart.php index a5c2202e5200..6bb14e6c2e9a 100644 --- a/CRM/Event/Cart/DAO/Cart.php +++ b/CRM/Event/Cart/DAO/Cart.php @@ -104,6 +104,7 @@ public static function &fields() { 'name' => 'completed', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Complete?'), + 'default' => '0', 'table_name' => 'civicrm_event_carts', 'entity' => 'Cart', 'bao' => 'CRM_Event_Cart_BAO_Cart', diff --git a/CRM/Event/DAO/Event.php b/CRM/Event/DAO/Event.php index caa4b866f95f..1f13607d0cf2 100644 --- a/CRM/Event/DAO/Event.php +++ b/CRM/Event/DAO/Event.php @@ -609,6 +609,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Event Type'), 'description' => 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -626,6 +627,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Participant Listing'), 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -693,6 +695,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Online Registration'), 'description' => 'If true, include registration link on Event Info page.', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -776,6 +779,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is this a PAID event?'), 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -828,6 +832,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Map Enabled'), 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -841,6 +846,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Active'), 'description' => 'Is this Event enabled or disabled/cancelled?', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -997,6 +1003,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is confirm email'), 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1151,6 +1158,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Pay Later Allowed'), 'description' => 'if true - allows the user to send payment directly to the org later', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1190,6 +1198,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Partial Payments Enabled'), 'description' => 'is partial payment enabled for this event', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1248,6 +1257,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Allow Multiple Registrations'), 'description' => 'if true - allows the user to register multiple participants for event', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1261,6 +1271,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Maximum number of additional participants per registration'), 'description' => 'Maximum number of additional participants that can be registered on a single booking', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1271,6 +1282,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Does Event allow multiple registrations from same email address?'), 'description' => 'if true - allows the user to register multiple registrations from same email address.', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1323,6 +1335,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Allow Self-service Cancellation or Transfer'), 'description' => 'Allow self service cancellation or transfer for event?', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1336,6 +1349,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Self-service Cancellation or Transfer Time'), 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1380,6 +1394,7 @@ public static function &fields() { 'title' => ts('Is an Event Template'), 'description' => 'whether the event has template', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', @@ -1556,6 +1571,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is billing block required'), 'description' => 'if true than billing block is required this event', + 'default' => '0', 'table_name' => 'civicrm_event', 'entity' => 'Event', 'bao' => 'CRM_Event_BAO_Event', diff --git a/CRM/Event/DAO/Participant.php b/CRM/Event/DAO/Participant.php index a25c71bb8259..941d0eff23dc 100644 --- a/CRM/Event/DAO/Participant.php +++ b/CRM/Event/DAO/Participant.php @@ -364,6 +364,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_participant', 'entity' => 'Participant', 'bao' => 'CRM_Event_BAO_Participant', @@ -378,6 +379,7 @@ public static function &fields() { 'headerPattern' => '/(is.)?(pay(.)?later)$/i', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_participant', 'entity' => 'Participant', 'bao' => 'CRM_Event_BAO_Participant', diff --git a/CRM/Financial/DAO/FinancialAccount.php b/CRM/Financial/DAO/FinancialAccount.php index 4d7f073092b7..f2ab3fff119d 100644 --- a/CRM/Financial/DAO/FinancialAccount.php +++ b/CRM/Financial/DAO/FinancialAccount.php @@ -279,6 +279,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Header Financial Account?'), 'description' => 'Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?', + 'default' => '0', 'table_name' => 'civicrm_financial_account', 'entity' => 'FinancialAccount', 'bao' => 'CRM_Financial_BAO_FinancialAccount', @@ -300,6 +301,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Tax Financial Account?'), 'description' => 'Is this account for taxes?', + 'default' => '0', 'table_name' => 'civicrm_financial_account', 'entity' => 'FinancialAccount', 'bao' => 'CRM_Financial_BAO_FinancialAccount', diff --git a/CRM/Financial/DAO/FinancialItem.php b/CRM/Financial/DAO/FinancialItem.php index 480b78afdcaf..7cfd9b651eb1 100644 --- a/CRM/Financial/DAO/FinancialItem.php +++ b/CRM/Financial/DAO/FinancialItem.php @@ -207,6 +207,7 @@ public static function &fields() { 20, 2 ], + 'default' => '0', 'table_name' => 'civicrm_financial_item', 'entity' => 'FinancialItem', 'bao' => 'CRM_Financial_BAO_FinancialItem', diff --git a/CRM/Financial/DAO/FinancialTrxn.php b/CRM/Financial/DAO/FinancialTrxn.php index 6ac9060720c9..bf194318976b 100644 --- a/CRM/Financial/DAO/FinancialTrxn.php +++ b/CRM/Financial/DAO/FinancialTrxn.php @@ -321,6 +321,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_financial_trxn', 'entity' => 'FinancialTrxn', 'bao' => 'CRM_Financial_DAO_FinancialTrxn', diff --git a/CRM/Mailing/DAO/Component.php b/CRM/Mailing/DAO/Component.php index d0c861594b64..38aef9f12aea 100644 --- a/CRM/Mailing/DAO/Component.php +++ b/CRM/Mailing/DAO/Component.php @@ -182,6 +182,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Mailing Component is Default?'), 'description' => 'Is this the default component for this component_type?', + 'default' => '0', 'table_name' => 'civicrm_mailing_component', 'entity' => 'Component', 'bao' => 'CRM_Mailing_BAO_Component', diff --git a/CRM/Mailing/DAO/Mailing.php b/CRM/Mailing/DAO/Mailing.php index aafeb0090d36..286256a503b2 100644 --- a/CRM/Mailing/DAO/Mailing.php +++ b/CRM/Mailing/DAO/Mailing.php @@ -674,6 +674,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Override Verp'), 'description' => 'Should we overrite VERP address in Reply-To', + 'default' => '0', 'table_name' => 'civicrm_mailing', 'entity' => 'Mailing', 'bao' => 'CRM_Mailing_BAO_Mailing', @@ -814,6 +815,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Mailing Archived?'), 'description' => 'Is this mailing archived?', + 'default' => '0', 'table_name' => 'civicrm_mailing', 'entity' => 'Mailing', 'bao' => 'CRM_Mailing_BAO_Mailing', @@ -865,6 +867,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('No Duplicate emails?'), 'description' => 'Remove duplicate emails?', + 'default' => '0', 'table_name' => 'civicrm_mailing', 'entity' => 'Mailing', 'bao' => 'CRM_Mailing_BAO_Mailing', diff --git a/CRM/Mailing/DAO/MailingJob.php b/CRM/Mailing/DAO/MailingJob.php index 93cd68194865..931685895fdc 100644 --- a/CRM/Mailing/DAO/MailingJob.php +++ b/CRM/Mailing/DAO/MailingJob.php @@ -216,6 +216,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Mailing Job Is Test?'), 'description' => 'Is this job for a test mail?', + 'default' => '0', 'table_name' => 'civicrm_mailing_job', 'entity' => 'MailingJob', 'bao' => 'CRM_Mailing_BAO_MailingJob', @@ -250,6 +251,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Mailing Job Offset'), 'description' => 'Offset of the child job', + 'default' => '0', 'table_name' => 'civicrm_mailing_job', 'entity' => 'MailingJob', 'bao' => 'CRM_Mailing_BAO_MailingJob', @@ -260,6 +262,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Mailing Job Limit'), 'description' => 'Queue size limit for each child job', + 'default' => '0', 'table_name' => 'civicrm_mailing_job', 'entity' => 'MailingJob', 'bao' => 'CRM_Mailing_BAO_MailingJob', diff --git a/CRM/Member/DAO/Membership.php b/CRM/Member/DAO/Membership.php index 969b243937fa..136cc97aca08 100644 --- a/CRM/Member/DAO/Membership.php +++ b/CRM/Member/DAO/Membership.php @@ -406,6 +406,7 @@ public static function &fields() { 'headerPattern' => '/(is.)?test(.member(ship)?)?/i', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_membership', 'entity' => 'Membership', 'bao' => 'CRM_Member_BAO_Membership', @@ -423,6 +424,7 @@ public static function &fields() { 'headerPattern' => '/(is.)?(pay(.)?later)$/i', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_membership', 'entity' => 'Membership', 'bao' => 'CRM_Member_BAO_Membership', diff --git a/CRM/Member/DAO/MembershipBlock.php b/CRM/Member/DAO/MembershipBlock.php index cba09a6af55a..118a8ff42514 100644 --- a/CRM/Member/DAO/MembershipBlock.php +++ b/CRM/Member/DAO/MembershipBlock.php @@ -281,6 +281,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Required'), 'description' => 'Is membership sign up optional', + 'default' => '0', 'table_name' => 'civicrm_membership_block', 'entity' => 'MembershipBlock', 'bao' => 'CRM_Member_BAO_MembershipBlock', diff --git a/CRM/Member/DAO/MembershipStatus.php b/CRM/Member/DAO/MembershipStatus.php index e38b1559339c..4df669ce82c9 100644 --- a/CRM/Member/DAO/MembershipStatus.php +++ b/CRM/Member/DAO/MembershipStatus.php @@ -346,6 +346,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Reserved'), 'description' => 'Is this membership_status reserved.', + 'default' => '0', 'table_name' => 'civicrm_membership_status', 'entity' => 'MembershipStatus', 'bao' => 'CRM_Member_BAO_MembershipStatus', diff --git a/CRM/Member/DAO/MembershipType.php b/CRM/Member/DAO/MembershipType.php index a5469039bf71..8b7301f8194d 100644 --- a/CRM/Member/DAO/MembershipType.php +++ b/CRM/Member/DAO/MembershipType.php @@ -305,6 +305,7 @@ public static function &fields() { 18, 9 ], + 'default' => '0', 'table_name' => 'civicrm_membership_type', 'entity' => 'MembershipType', 'bao' => 'CRM_Member_BAO_MembershipType', @@ -484,6 +485,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Auto Renew'), 'description' => '0 = No auto-renew option; 1 = Give option, but not required; 2 = Auto-renew required;', + 'default' => '0', 'table_name' => 'civicrm_membership_type', 'entity' => 'MembershipType', 'bao' => 'CRM_Member_BAO_MembershipType', diff --git a/CRM/PCP/DAO/PCP.php b/CRM/PCP/DAO/PCP.php index 09371761b8bf..72a9d6eb0cb1 100644 --- a/CRM/PCP/DAO/PCP.php +++ b/CRM/PCP/DAO/PCP.php @@ -298,6 +298,7 @@ public static function &fields() { 'name' => 'is_thermometer', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Use Thermometer?'), + 'default' => '0', 'table_name' => 'civicrm_pcp', 'entity' => 'PCP', 'bao' => 'CRM_PCP_BAO_PCP', @@ -310,6 +311,7 @@ public static function &fields() { 'name' => 'is_honor_roll', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Show Honor Roll?'), + 'default' => '0', 'table_name' => 'civicrm_pcp', 'entity' => 'PCP', 'bao' => 'CRM_PCP_BAO_PCP', @@ -362,6 +364,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Enabled?'), 'description' => 'Is Personal Campaign Page enabled/active?', + 'default' => '0', 'table_name' => 'civicrm_pcp', 'entity' => 'PCP', 'bao' => 'CRM_PCP_BAO_PCP', @@ -375,6 +378,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Notify Owner?'), 'description' => 'Notify owner via email when someone donates to page?', + 'default' => '0', 'table_name' => 'civicrm_pcp', 'entity' => 'PCP', 'bao' => 'CRM_PCP_BAO_PCP', diff --git a/CRM/PCP/DAO/PCPBlock.php b/CRM/PCP/DAO/PCPBlock.php index c1f007d56403..37fcaeb0d765 100644 --- a/CRM/PCP/DAO/PCPBlock.php +++ b/CRM/PCP/DAO/PCPBlock.php @@ -225,6 +225,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Owner Notification'), 'description' => 'FK to civicrm_option_group with name = PCP owner notifications', + 'default' => '0', 'table_name' => 'civicrm_pcp_block', 'entity' => 'PCPBlock', 'bao' => 'CRM_PCP_BAO_PCPBlock', diff --git a/CRM/Pledge/DAO/Pledge.php b/CRM/Pledge/DAO/Pledge.php index 21d857a3d9f9..bfe1c0961282 100644 --- a/CRM/Pledge/DAO/Pledge.php +++ b/CRM/Pledge/DAO/Pledge.php @@ -575,6 +575,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_pledge', 'entity' => 'Pledge', 'bao' => 'CRM_Pledge_BAO_Pledge', diff --git a/CRM/Pledge/DAO/PledgeBlock.php b/CRM/Pledge/DAO/PledgeBlock.php index 19ee593688d0..1efdbf69aca9 100644 --- a/CRM/Pledge/DAO/PledgeBlock.php +++ b/CRM/Pledge/DAO/PledgeBlock.php @@ -188,6 +188,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Expose Frequency Interval?'), 'description' => 'Is frequency interval exposed on the contribution form.', + 'default' => '0', 'table_name' => 'civicrm_pledge_block', 'entity' => 'PledgeBlock', 'bao' => 'CRM_Pledge_BAO_PledgeBlock', @@ -244,6 +245,7 @@ public static function &fields() { 'title' => ts('Show Recurring Donation Start Date?'), 'description' => 'If true - recurring start date is shown.', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_pledge_block', 'entity' => 'PledgeBlock', 'bao' => 'CRM_Pledge_BAO_PledgeBlock', @@ -255,6 +257,7 @@ public static function &fields() { 'title' => ts('Allow Edits to Recurring Donation Start Date?'), 'description' => 'If true - recurring start date is editable.', 'required' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_pledge_block', 'entity' => 'PledgeBlock', 'bao' => 'CRM_Pledge_BAO_PledgeBlock', diff --git a/CRM/Pledge/DAO/PledgePayment.php b/CRM/Pledge/DAO/PledgePayment.php index d3f05e4656b9..3a996ff0ed45 100644 --- a/CRM/Pledge/DAO/PledgePayment.php +++ b/CRM/Pledge/DAO/PledgePayment.php @@ -266,6 +266,7 @@ public static function &fields() { 'headerPattern' => '', 'dataPattern' => '', 'export' => TRUE, + 'default' => '0', 'table_name' => 'civicrm_pledge_payment', 'entity' => 'PledgePayment', 'bao' => 'CRM_Pledge_BAO_PledgePayment', diff --git a/CRM/Price/DAO/PriceField.php b/CRM/Price/DAO/PriceField.php index 9cfe9768066e..aeaf386e72e7 100644 --- a/CRM/Price/DAO/PriceField.php +++ b/CRM/Price/DAO/PriceField.php @@ -254,6 +254,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Price Field Quantity Required?'), 'description' => 'Enter a quantity for this field?', + 'default' => '0', 'table_name' => 'civicrm_price_field', 'entity' => 'PriceField', 'bao' => 'CRM_Price_BAO_PriceField', diff --git a/CRM/Price/DAO/PriceFieldValue.php b/CRM/Price/DAO/PriceFieldValue.php index e656e0ed28e5..f07a16e344e4 100644 --- a/CRM/Price/DAO/PriceFieldValue.php +++ b/CRM/Price/DAO/PriceFieldValue.php @@ -382,6 +382,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Default Price Field Option?'), 'description' => 'Is this default price field option', + 'default' => '0', 'table_name' => 'civicrm_price_field_value', 'entity' => 'PriceFieldValue', 'bao' => 'CRM_Price_BAO_PriceFieldValue', diff --git a/CRM/Price/DAO/PriceSet.php b/CRM/Price/DAO/PriceSet.php index 3abf87d17f27..cd26b23f7773 100644 --- a/CRM/Price/DAO/PriceSet.php +++ b/CRM/Price/DAO/PriceSet.php @@ -318,6 +318,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Price Set Quick Config?'), 'description' => 'Is set if edited on Contribution or Event Page rather than through Manage Price Sets', + 'default' => '0', 'table_name' => 'civicrm_price_set', 'entity' => 'PriceSet', 'bao' => 'CRM_Price_BAO_PriceSet', @@ -331,6 +332,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Price Set Is Reserved'), 'description' => 'Is this a predefined system price set (i.e. it can not be deleted, edited)?', + 'default' => '0', 'table_name' => 'civicrm_price_set', 'entity' => 'PriceSet', 'bao' => 'CRM_Price_BAO_PriceSet', @@ -344,6 +346,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Minimum Amount'), 'description' => 'Minimum Amount required for this set.', + 'default' => '0', 'table_name' => 'civicrm_price_set', 'entity' => 'PriceSet', 'bao' => 'CRM_Price_BAO_PriceSet', diff --git a/CRM/Report/DAO/ReportInstance.php b/CRM/Report/DAO/ReportInstance.php index 4effadcc03db..141e6f6312c8 100644 --- a/CRM/Report/DAO/ReportInstance.php +++ b/CRM/Report/DAO/ReportInstance.php @@ -500,6 +500,7 @@ public static function &fields() { 'name' => 'is_reserved', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Instance is Reserved'), + 'default' => '0', 'table_name' => 'civicrm_report_instance', 'entity' => 'ReportInstance', 'bao' => 'CRM_Report_BAO_ReportInstance', diff --git a/CRM/SMS/DAO/Provider.php b/CRM/SMS/DAO/Provider.php index 990f58c84eaa..fc295eef0d59 100644 --- a/CRM/SMS/DAO/Provider.php +++ b/CRM/SMS/DAO/Provider.php @@ -237,6 +237,7 @@ public static function &fields() { 'name' => 'is_default', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('SMS Provider is Default?'), + 'default' => '0', 'table_name' => 'civicrm_sms_provider', 'entity' => 'Provider', 'bao' => 'CRM_SMS_BAO_Provider', @@ -249,6 +250,7 @@ public static function &fields() { 'name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('SMS Provider is Active?'), + 'default' => '0', 'table_name' => 'civicrm_sms_provider', 'entity' => 'Provider', 'bao' => 'CRM_SMS_BAO_Provider', diff --git a/xml/templates/dao.tpl b/xml/templates/dao.tpl index 9c39ce74086c..9e4c4f4c5960 100644 --- a/xml/templates/dao.tpl +++ b/xml/templates/dao.tpl @@ -131,7 +131,7 @@ class {$table.className} extends CRM_Core_DAO {ldelim} {if $field.rule} 'rule' => '{$field.rule}', {/if} {* field.rule *} -{if $field.default} +{if $field.default || $field.default === '0'} 'default' => '{if ($field.default[0]=="'" or $field.default[0]=='"')}{$field.default|substring:1:-1}{else}{$field.default}{/if}', {/if} {* field.default *} 'table_name' => '{$table.name}',