Skip to content

Commit

Permalink
Respect '0' as a default when generating DAOs
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jul 17, 2018
1 parent d076584 commit 45a83e4
Show file tree
Hide file tree
Showing 57 changed files with 167 additions and 21 deletions.
1 change: 1 addition & 0 deletions CRM/ACL/DAO/ACL.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 4 additions & 0 deletions CRM/Activity/DAO/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions CRM/Campaign/DAO/Survey.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions CRM/Case/DAO/Case.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 8 additions & 0 deletions CRM/Contact/DAO/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions CRM/Contact/DAO/DashboardContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions CRM/Contact/DAO/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions CRM/Contact/DAO/Relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ public static function &fields() {
'title' => ts('Contact A has Permission Over Contact B'),
'description' => 'Permission that Contact A has to view/update Contact B',
'required' => TRUE,
'default' => '0',
'table_name' => 'civicrm_relationship',
'entity' => 'Relationship',
'bao' => 'CRM_Contact_BAO_Relationship',
Expand All @@ -270,6 +271,7 @@ public static function &fields() {
'title' => ts('Contact B has Permission Over Contact A'),
'description' => 'Permission that Contact B has to view/update Contact A',
'required' => TRUE,
'default' => '0',
'table_name' => 'civicrm_relationship',
'entity' => 'Relationship',
'bao' => 'CRM_Contact_BAO_Relationship',
Expand Down
3 changes: 3 additions & 0 deletions CRM/Contribute/DAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
10 changes: 10 additions & 0 deletions CRM/Contribute/DAO/ContributionPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions CRM/Contribute/DAO/ContributionRecur.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions CRM/Contribute/DAO/ContributionSoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions CRM/Contribute/DAO/Premium.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading

0 comments on commit 45a83e4

Please sign in to comment.