From: Tim Otten Date: Tue, 15 Sep 2015 07:18:10 +0000 (-0700) Subject: civicrm_navigation.tpl - Move defaults into settings/*.php X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=007e3bdcefc15254f99a645683a98cb8d3eea8c4;p=civicrm-core.git civicrm_navigation.tpl - Move defaults into settings/*.php For a large number of settings, defaults are declared twice -- once in `xml/templates/civicrm_navigation.tpl` and once in `settings/*.php`. In many cases, these are identical/redundant, but there are a couple where the defaults diverged. I believe the `civicrm_navigation.tpl` values have generally taken precedent on new installations, so this commit revises `settings/*.php` to fix any discrepancies. --- diff --git a/bin/regen.sh b/bin/regen.sh index ff3f033593..250120e2ed 100755 --- a/bin/regen.sh +++ b/bin/regen.sh @@ -46,7 +46,7 @@ php GenerateData.php cd $CIVISOURCEDIR "$PHP5PATH"php bin/cli.php -e System -a flush --triggers 1 --session 1 -$MYSQLCMD -e "DROP TABLE zipcodes; UPDATE civicrm_domain SET config_backend = NULL; DELETE FROM civicrm_extension; DELETE FROM civicrm_cache; UPDATE civicrm_setting SET value = NULL WHERE group_name IN ('Directory Preferences','URL Preferences');" +$MYSQLCMD -e "DROP TABLE zipcodes; UPDATE civicrm_domain SET config_backend = NULL; DELETE FROM civicrm_extension; DELETE FROM civicrm_cache; DELETE FROM civicrm_setting;" TABLENAMES=$( echo "show tables like 'civicrm_%'" | $MYSQLCMD | grep ^civicrm_ | xargs ) cd $CIVISOURCEDIR/sql diff --git a/settings/Contribute.setting.php b/settings/Contribute.setting.php index 34fc2ee730..e0df612cdf 100644 --- a/settings/Contribute.setting.php +++ b/settings/Contribute.setting.php @@ -51,4 +51,25 @@ return array( 'description' => 'Is the CVV code required for back office credit card transactions', 'help_text' => 'If set it back-office credit card transactions will required a cvv code. Leave as required unless you have a very strong reason to change', ), + 'contribution_invoice_settings' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'contribution_invoice_settings', + 'type' => 'Array', + 'default' => array( + 'invoice_prefix' => 'INV_', + 'credit_notes_prefix' => 'CN_', + 'due_date' => '10', + 'due_date_period' => 'days', + 'notes' => '', + 'tax_term' => 'Sales Tax', + 'tax_display_settings' => 'Inclusive', + ), + 'add' => '4.7', + 'title' => 'Contribution Invoice Settings', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => NULL, + 'help_text' => NULL, + ), ); diff --git a/settings/Core.setting.php b/settings/Core.setting.php index c4c5cd056b..68d8e18f02 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -62,7 +62,7 @@ return array( 'pseudoconstant' => array( 'optionGroupName' => 'contact_edit_options', ), - 'default' => '1234567891011', + 'default' => '123456789111214151617', 'add' => '4.1', 'title' => 'Editing Contacts', 'is_domain' => 1, @@ -78,7 +78,7 @@ return array( 'pseudoconstant' => array( 'optionGroupName' => 'advanced_search_options', ), - 'default' => '1234567891012131516171819', + 'default' => '123456789101112131516171819', 'add' => '4.1', 'title' => 'Contact Search', 'is_domain' => 1, @@ -95,7 +95,7 @@ return array( 'pseudoconstant' => array( 'optionGroupName' => 'user_dashboard_options', ), - 'default' => '12345789', + 'default' => '1234578', 'add' => '4.1', 'title' => 'Contact Dashboard', 'is_domain' => 1, @@ -112,7 +112,7 @@ return array( 'pseudoconstant' => array( 'optionGroupName' => 'address_options', ), - 'default' => '1245891011', + 'default' => '123456891011', 'add' => '4.1', 'title' => 'Addressing Options', 'is_domain' => 1, @@ -196,7 +196,7 @@ return array( 'name' => 'contact_ajax_check_similar', 'type' => 'String', 'html_type' => 'Text', - 'default' => NULL, + 'default' => '1', 'add' => '4.1', 'title' => 'Ajax Check Similar', 'is_domain' => 1, @@ -224,7 +224,7 @@ return array( 'name' => 'activity_assignee_notification', 'type' => 'String', 'html_type' => 'Text', - 'default' => NULL, + 'default' => '1', 'add' => '4.1', 'title' => 'Notify Activity Assignees', 'is_domain' => 1, @@ -238,7 +238,7 @@ return array( 'name' => 'activity_assignee_notification_ics', 'type' => 'String', 'html_type' => 'Text', - 'default' => NULL, + 'default' => '0', 'add' => '4.3', 'title' => 'Include ICal Invite to Activity Assignees', 'is_domain' => 1, @@ -280,6 +280,20 @@ return array( 'description' => "Selected fields will be displayed in autocomplete dropdown search results for 'Contact Reference' custom fields. Contact Name is always included. NOTE: You must assign 'access contact reference fields' permission to the anonymous role if you want to use custom contact reference fields in profiles on public pages. For most situations, you should use the 'Limit List to Group' setting when configuring a contact reference field which will be used in public forms to prevent exposing your entire contact list.", 'help_text' => NULL, ), + 'contact_smart_group_display' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'contact_smart_group_display', + 'type' => 'String', + 'html_type' => 'radio', + 'default' => '1', + 'add' => '4.7', + 'title' => ts('Viewing Smart Groups'), + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => NULL, + 'help_text' => NULL, + ), 'max_attachments' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', diff --git a/settings/Event.setting.php b/settings/Event.setting.php index 682849c127..bc0f785991 100644 --- a/settings/Event.setting.php +++ b/settings/Event.setting.php @@ -36,18 +36,17 @@ * Settings metadata file */ return array( - 'event_enable_cart' => - array( + 'enable_cart' => array( 'name' => 'enable_cart', 'group_name' => 'Event Preferences', 'group' => 'event', - 'type' => 'String', + 'type' => 'Boolean', 'quick_form_type' => 'Element', - 'default' => 0, - 'add' => 4.1, + 'default' => '0', + 'add' => '4.1', 'title' => 'Enable Event Cart', 'is_domain' => 1, - 'is_contact' => 1, + 'is_contact' => 0, 'description' => "WRITE ME", 'help_text' => 'WRITE ME', ), diff --git a/settings/Mailing.setting.php b/settings/Mailing.setting.php index b940aaea37..415219a0ca 100644 --- a/settings/Mailing.setting.php +++ b/settings/Mailing.setting.php @@ -43,7 +43,7 @@ return array( 'name' => 'profile_double_optin', 'type' => 'Integer', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => '1', 'add' => '4.1', 'title' => 'Enable Double Opt-in for Profile Group(s) field', 'is_domain' => 1, @@ -57,7 +57,7 @@ return array( 'name' => 'track_civimail_replies', 'type' => 'Integer', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => '0', 'add' => '4.1', 'title' => 'Track replies using VERP in Reply-To header', 'is_domain' => 1, @@ -72,7 +72,7 @@ return array( 'name' => 'civimail_workflow', 'type' => 'Integer', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => '0', 'add' => '4.1', 'title' => 'Use CiviMail Workflow', 'is_domain' => 1, @@ -86,7 +86,7 @@ return array( 'name' => 'civimail_server_wide_lock', 'type' => 'Integer', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => '0', 'add' => '4.1', 'title' => 'Lock Mails Server-Wide for Mail Sending', 'is_domain' => 1, @@ -114,7 +114,7 @@ return array( 'name' => 'mailing_backend', 'type' => 'Array', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => array('outBound_option' => '3'), 'add' => '4.1', 'title' => 'Mailing Backend', 'is_domain' => 1, @@ -128,7 +128,7 @@ return array( 'name' => 'profile_add_to_group_double_optin', 'type' => 'Integer', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => '0', 'add' => '4.1', 'title' => 'Enable Double Opt-in for Profile Group(s) field', 'is_domain' => 1, @@ -301,4 +301,18 @@ return array( 'description' => 'Separator character used when CiviMail generates VERP (variable envelope return path) Mail-From addresses.', 'help_text' => NULL, ), + 'write_activity_record' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'write_activity_record', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '1', + 'add' => '4.7', + 'title' => 'Enable CiviMail to create activities on delivery', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => NULL, + 'help_text' => NULL, + ), ); diff --git a/settings/Multisite.setting.php b/settings/Multisite.setting.php index 9fb3e5b9d9..9406504e83 100644 --- a/settings/Multisite.setting.php +++ b/settings/Multisite.setting.php @@ -43,7 +43,7 @@ return array( 'name' => 'is_enabled', 'title' => 'Multisite Is enabled', 'type' => 'Integer', - 'default' => NULL, + 'default' => '0', 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, @@ -56,7 +56,7 @@ return array( 'name' => 'domain_group_id', 'title' => 'Multisite Domain Group', 'type' => 'Integer', - 'default' => NULL, + 'default' => '0', 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, @@ -69,7 +69,7 @@ return array( 'name' => 'event_price_set_domain_id', 'title' => 'Domain Event Price Set', 'type' => 'Integer', - 'default' => NULL, + 'default' => '0', 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, @@ -82,7 +82,7 @@ return array( 'name' => 'uniq_email_per_site', 'type' => 'Integer', 'title' => 'Unique Email per Domain?', - 'default' => NULL, + 'default' => '0', 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, diff --git a/xml/templates/civicrm_navigation.tpl b/xml/templates/civicrm_navigation.tpl index c612c5d140..b5feb1cf8f 100644 --- a/xml/templates/civicrm_navigation.tpl +++ b/xml/templates/civicrm_navigation.tpl @@ -30,66 +30,6 @@ SELECT @domainID := id FROM civicrm_domain where name = 'Default Domain Name'; -- Initial default state of system preferences --- Initial default state of system settings -INSERT INTO civicrm_setting - ( domain_id, contact_id, is_domain, group_name, name, value ) -VALUES - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'contact_view_options', '{serialize}123456789101113{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'contact_smart_group_display', '{serialize}1{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'contact_edit_options', '{serialize}123456789111214151617{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'advanced_search_options', '{serialize}123456789101112131516171819{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'user_dashboard_options', '{serialize}1234578{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'address_options', '{serialize}123456891011{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'address_format', '{serialize}{literal}{contact.address_name} -{contact.street_address} -{contact.supplemental_address_1} -{contact.supplemental_address_2} -{contact.city}{, }{contact.state_province}{ }{contact.postal_code} -{contact.country}{/literal}{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'mailing_format', '{serialize}{literal}{contact.addressee} -{contact.street_address} -{contact.supplemental_address_1} -{contact.supplemental_address_2} -{contact.city}{, }{contact.state_province}{ }{contact.postal_code} -{contact.country}{/literal}{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'display_name_format', '{serialize}{literal}{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}{/literal}{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'sort_name_format', '{serialize}{literal}{contact.last_name}{, }{contact.first_name}{/literal}{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'editor_id', '{serialize}CKEditor{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'contact_ajax_check_similar', '{serialize}1{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'activity_assignee_notification', '{serialize}1{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'activity_assignee_notification_ics', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'contact_autocomplete_options', '{serialize}12{/serialize}' ), - ( @domainID, NULL, 1, 'CiviCRM Preferences', 'contact_reference_options', '{serialize}12{/serialize}' ), - ( @domainID, NULL, 1, 'Address Standardization Preferences', 'address_standardization_provider', NULL ), - ( @domainID, NULL, 1, 'Address Standardization Preferences', 'address_standardization_userid', NULL ), - ( @domainID, NULL, 1, 'Address Standardization Preferences', 'address_standardization_url', NULL ), - ( @domainID, NULL, 1, 'Campaign Preferences', 'tag_unconfirmed', '{serialize}Unconfirmed{/serialize}' ), - ( @domainID, NULL, 1, 'Campaign Preferences', 'petition_contacts', '{serialize}Petition Contacts{/serialize}' ), - ( @domainID, NULL, 1, 'Event Preferences' , 'enable_cart', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Mailing Preferences', 'profile_double_optin', '{serialize}1{/serialize}' ), - ( @domainID, NULL, 1, 'Mailing Preferences', 'profile_add_to_group_double_optin', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Mailing Preferences', 'track_civimail_replies', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Mailing Preferences', 'civimail_workflow', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Mailing Preferences', 'civimail_server_wide_lock', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Mailing Preferences', 'mailing_backend', {literal}'a:1:{s:15:"outBound_option";s:1:"3";}'{/literal} ), - ( @domainID, NULL, 1, 'Mailing Preferences', 'write_activity_record', '{serialize}1{/serialize}' ), - ( @domainID, NULL, 1, 'Member Preferences' , 'default_renewal_contribution_page', NULL ), - ( @domainID, NULL, 1, 'Multi Site Preferences', 'is_enabled', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Multi Site Preferences', 'uniq_email_per_site', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Multi Site Preferences', 'domain_group_id', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Multi Site Preferences', 'event_price_set_domain_id', '{serialize}0{/serialize}' ), - ( @domainID, NULL, 1, 'Directory Preferences', 'uploadDir' , NULL ), - ( @domainID, NULL, 1, 'Directory Preferences', 'imageUploadDir' , NULL ), - ( @domainID, NULL, 1, 'Directory Preferences', 'customFileUploadDir', NULL ), - ( @domainID, NULL, 1, 'Directory Preferences', 'customTemplateDir' , NULL ), - ( @domainID, NULL, 1, 'Directory Preferences', 'customPHPPathDir' , NULL ), - ( @domainID, NULL, 1, 'Directory Preferences', 'extensionsDir' , NULL ), - ( @domainID, NULL, 1, 'URL Preferences', 'userFrameworkResourceURL' , NULL ), - ( @domainID, NULL, 1, 'URL Preferences', 'imageUploadURL' , NULL ), - ( @domainID, NULL, 1, 'URL Preferences', 'customCSSURL' , NULL ), - ( @domainID, NULL, 1, 'URL Preferences', 'extensionsURL' , NULL ), - ( @domainID, NULL, 1, 'Contribute Preferences', 'contribution_invoice_settings', {literal}'a:7:{s:14:"invoice_prefix";s:4:"INV_";s:19:"credit_notes_prefix";s:3:"CN_";s:8:"due_date";s:2:"10";s:15:"due_date_period";s:4:"days";s:5:"notes";s:0:"";s:8:"tax_term";s:9:"Sales Tax";s:20:"tax_display_settings";s:9:"Inclusive";}'{/literal}); - -- mail settings INSERT INTO civicrm_mail_settings (domain_id, name, is_default, domain) VALUES (@domainID, 'default', true, 'EXAMPLE.ORG');