From 10824d34f46221147b3ca4a8b9fa0acc093dc689 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 13 May 2013 14:29:08 +1200 Subject: [PATCH] CRM-12595 fix formatting in CRM/Upgrade files --- .../membership_offline_receipt_text.tpl | 2 +- .../test_preview_subject.tpl | 2 +- .../message_templates/test_preview_text.tpl | 2 +- .../event_offline_receipt_html.tpl | 28 +- .../event_offline_receipt_text.tpl | 2 +- .../event_online_receipt_html.tpl | 12 +- .../event_online_receipt_text.tpl | 2 +- .../message_templates/case_activity_html.tpl | 10 +- .../message_templates/case_activity_html.tpl | 206 +++---- .../message_templates/case_activity_text.tpl | 74 +-- .../membership_online_receipt_html.tpl | 1 - .../contribution_recurring_notify_html.tpl | 4 +- .../petition_confirmation_needed_html.tpl | 2 +- .../petition_confirmation_needed_text.tpl | 4 +- .../event_offline_receipt_html.tpl | 22 +- .../event_offline_receipt_text.tpl | 4 +- .../event_online_receipt_html.tpl | 14 +- .../event_online_receipt_text.tpl | 4 +- .../petition_confirmation_needed_text.tpl | 4 +- .../membership_online_receipt_html.tpl | 4 +- .../event_online_receipt_html.tpl | 18 +- .../event_online_receipt_text.tpl | 6 +- .../membership_online_receipt_html.tpl | 2 +- .../membership_offline_receipt_html.tpl | 8 +- .../membership_offline_receipt_text.tpl | 2 +- .../membership_online_receipt_html.tpl | 8 +- .../membership_offline_receipt_html.tpl | 8 +- .../membership_offline_receipt_text.tpl | 2 +- .../membership_online_receipt_html.tpl | 8 +- .../civicrm_msg_template.tpl | 14 +- .../event_online_receipt_html.tpl | 14 +- .../event_online_receipt_text.tpl | 4 +- .../petition_confirmation_needed_html.tpl | 2 +- .../petition_confirmation_needed_text.tpl | 4 +- .../event_online_receipt_html.tpl | 44 +- .../event_online_receipt_text.tpl | 6 +- .../civicrm_msg_template.tpl | 8 +- .../contribution_recurring_billing_html.tpl | 2 +- .../contribution_recurring_edit_text.tpl | 6 +- .../contribution_recurring_notify_html.tpl | 4 +- .../contribution_recurring_notify_text.tpl | 2 +- .../event_online_receipt_html.tpl | 43 +- .../event_online_receipt_text.tpl | 6 +- .../membership_autorenew_billing_html.tpl | 3 +- .../membership_online_receipt_html.tpl | 6 +- .../event_offline_receipt_html.tpl | 22 +- .../event_offline_receipt_text.tpl | 4 +- .../event_online_receipt_html.tpl | 44 +- .../event_online_receipt_text.tpl | 6 +- .../membership_offline_receipt_text.tpl | 2 +- .../event_online_receipt_html.tpl | 44 +- .../event_online_receipt_text.tpl | 6 +- .../event_offline_receipt_html.tpl | 22 +- .../event_offline_receipt_text.tpl | 4 +- .../event_online_receipt_html.tpl | 44 +- .../event_online_receipt_text.tpl | 6 +- .../membership_offline_receipt_html.tpl | 8 +- .../membership_offline_receipt_text.tpl | 2 +- .../membership_online_receipt_html.tpl | 6 +- .../event_online_receipt_html.tpl | 45 +- .../event_online_receipt_text.tpl | 6 +- .../membership_online_receipt_html.tpl | 6 +- .../contribution_online_receipt_html.tpl | 2 +- CRM/Upgrade/Incremental/Legacy.php | 10 +- CRM/Upgrade/Incremental/php/ThreeFour.php | 19 +- CRM/Upgrade/Incremental/php/ThreeTwo.php | 5 +- CRM/Upgrade/Incremental/sql/2.1.2.mysql | 8 +- CRM/Upgrade/Incremental/sql/2.2.0.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/2.2.1.mysql.tpl | 18 +- CRM/Upgrade/Incremental/sql/2.2.3.mysql.tpl | 10 +- CRM/Upgrade/Incremental/sql/2.2.7.mysql.tpl | 40 +- .../Incremental/sql/2.2.alpha1.mysql.tpl | 100 ++-- .../Incremental/sql/2.2.alpha3.mysql.tpl | 18 +- .../Incremental/sql/2.2.beta1.mysql.tpl | 2 +- .../Incremental/sql/2.2.beta2.mysql.tpl | 18 +- .../Incremental/sql/2.2.beta3.mysql.tpl | 12 +- .../Incremental/sql/2.2.beta4.mysql.tpl | 4 +- CRM/Upgrade/Incremental/sql/3.0.0.mysql.tpl | 32 +- CRM/Upgrade/Incremental/sql/3.0.3.mysql.tpl | 30 +- CRM/Upgrade/Incremental/sql/3.0.4.mysql.tpl | 2 +- .../Incremental/sql/3.0.alpha1.mysql.tpl | 548 +++++++++--------- .../Incremental/sql/3.0.alpha2.mysql.tpl | 2 +- .../Incremental/sql/3.0.alpha3.mysql.tpl | 3 +- .../Incremental/sql/3.0.beta1.mysql.tpl | 8 +- .../Incremental/sql/3.0.beta2.mysql.tpl | 4 +- CRM/Upgrade/Incremental/sql/3.1.0.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/3.1.3.mysql.tpl | 21 +- CRM/Upgrade/Incremental/sql/3.1.4.mysql.tpl | 14 +- CRM/Upgrade/Incremental/sql/3.1.5.mysql.tpl | 4 +- .../Incremental/sql/3.1.alpha1.mysql.tpl | 124 ++-- .../Incremental/sql/3.1.alpha2.mysql.tpl | 4 +- .../Incremental/sql/3.1.beta1.mysql.tpl | 34 +- .../Incremental/sql/3.1.beta2.mysql.tpl | 22 +- .../Incremental/sql/3.1.beta4.mysql.tpl | 2 +- .../Incremental/sql/3.1.beta5.mysql.tpl | 4 +- CRM/Upgrade/Incremental/sql/3.2.1.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/3.2.2.mysql.tpl | 6 +- CRM/Upgrade/Incremental/sql/3.2.3.mysql.tpl | 8 +- CRM/Upgrade/Incremental/sql/3.2.4.mysql.tpl | 4 +- .../Incremental/sql/3.2.alpha1.mysql.tpl | 116 ++-- .../Incremental/sql/3.2.alpha3.mysql.tpl | 74 +-- .../Incremental/sql/3.2.alpha4.mysql.tpl | 6 +- .../Incremental/sql/3.2.beta1.mysql.tpl | 10 +- .../Incremental/sql/3.2.beta3.mysql.tpl | 30 +- .../Incremental/sql/3.2.beta4.mysql.tpl | 42 +- .../Incremental/sql/3.2.beta5.mysql.tpl | 10 +- CRM/Upgrade/Incremental/sql/3.3.0.mysql.tpl | 10 +- CRM/Upgrade/Incremental/sql/3.3.2.mysql.tpl | 22 +- CRM/Upgrade/Incremental/sql/3.3.4.mysql.tpl | 18 +- CRM/Upgrade/Incremental/sql/3.3.6.mysql.tpl | 6 +- .../Incremental/sql/3.3.alpha1.mysql.tpl | 82 +-- .../Incremental/sql/3.3.alpha2.mysql.tpl | 2 +- .../Incremental/sql/3.3.beta1.mysql.tpl | 26 +- .../Incremental/sql/3.3.beta2.mysql.tpl | 12 +- CRM/Upgrade/Incremental/sql/3.4.0.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/3.4.1.mysql.tpl | 12 +- CRM/Upgrade/Incremental/sql/3.4.2.mysql.tpl | 24 +- CRM/Upgrade/Incremental/sql/3.4.3.mysql.tpl | 26 +- CRM/Upgrade/Incremental/sql/3.4.5.mysql.tpl | 20 +- CRM/Upgrade/Incremental/sql/3.4.6.mysql.tpl | 10 +- .../Incremental/sql/3.4.alpha1.mysql.tpl | 22 +- .../Incremental/sql/3.4.alpha2.mysql.tpl | 12 +- .../Incremental/sql/3.4.alpha3.mysql.tpl | 4 +- .../Incremental/sql/3.4.beta2.mysql.tpl | 2 +- .../Incremental/sql/3.4.beta3.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/4.1.0.mysql.tpl | 1 - CRM/Upgrade/Incremental/sql/4.1.2.mysql.tpl | 2 +- .../Incremental/sql/4.1.alpha1.mysql.tpl | 144 ++--- .../Incremental/sql/4.1.alpha2.mysql.tpl | 4 +- .../Incremental/sql/4.1.beta1.mysql.tpl | 2 +- .../Incremental/sql/4.1.beta2.mysql.tpl | 202 +++---- .../Incremental/sql/4.1.beta3.mysql.tpl | 4 +- CRM/Upgrade/Incremental/sql/4.2.0.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/4.2.2.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/4.2.3.mysql.tpl | 14 +- CRM/Upgrade/Incremental/sql/4.2.5.mysql.tpl | 2 +- .../Incremental/sql/4.2.alpha2.mysql.tpl | 4 +- .../Incremental/sql/4.2.beta1.mysql.tpl | 2 +- .../Incremental/sql/4.2.beta6.mysql.tpl | 6 +- .../Incremental/sql/4.3.alpha1.mysql.tpl | 130 ++--- .../Incremental/sql/4.3.alpha2.mysql.tpl | 4 +- .../Incremental/sql/4.3.beta3.mysql.tpl | 2 +- CRM/Upgrade/Incremental/sql/README.txt | 4 +- CRM/Upgrade/Page/Cleanup.php | 2 +- CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php | 6 +- CRM/Upgrade/Snapshot/V4p2/Price/BAO/Set.php | 10 +- CRM/Upgrade/ThreeOne/ThreeOne.php | 2 +- CRM/Upgrade/ThreeZero/ThreeZero.php | 48 +- CRM/Upgrade/TwoOne/Form/Step1.php | 2 +- CRM/Upgrade/TwoOne/Form/Step2.php | 8 +- CRM/Upgrade/TwoOne/Form/Step3.php | 2 +- CRM/Upgrade/TwoOne/Form/TwoOneTwo.php | 2 +- CRM/Upgrade/TwoOne/sql/domain_ids.mysql | 24 +- CRM/Upgrade/TwoOne/sql/group_values.mysql | 50 +- CRM/Upgrade/TwoOne/sql/misc.mysql | 98 ++-- CRM/Upgrade/TwoOne/sql/two_one_two.mysql | 8 +- CRM/Upgrade/TwoTwo/Form/Step3.php | 22 +- 157 files changed, 1733 insertions(+), 1742 deletions(-) diff --git a/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl b/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl index fbffc4495d..544c06b0fa 100644 --- a/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl +++ b/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl @@ -31,7 +31,7 @@ {if $formValues.paidBy} {ts}Paid By{/ts}: {$formValues.paidBy} {if $formValues.check_number} -{ts}Check Number{/ts}: {$formValues.check_number} +{ts}Check Number{/ts}: {$formValues.check_number} {/if} {/if} {/if} diff --git a/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_subject.tpl b/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_subject.tpl index c0438bc9f9..20cc6a1050 100644 --- a/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_subject.tpl +++ b/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_subject.tpl @@ -1 +1 @@ -[TEST] +[TEST] diff --git a/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_text.tpl b/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_text.tpl index bf4c95f105..5821007a01 100644 --- a/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_text.tpl +++ b/CRM/Upgrade/3.1.alpha1.msg_template/message_templates/test_preview_text.tpl @@ -1,6 +1,6 @@ *********************************************************** -{ts}Test-drive Email / Receipt{/ts} +{ts}Test-drive Email / Receipt{/ts} {ts}This is a test-drive email. No live financial transaction has occurred.{/ts} diff --git a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl index 77ed2bb943..c2ad87ea6c 100755 --- a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl +++ b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl @@ -178,7 +178,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $participantCount }{ts}Total Participants{/ts}{/if} + {if $participantCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -194,11 +194,11 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $participantCount } - - {$line.participant_count} + {if $participantCount } + + {$line.participant_count} - {/if} + {/if} {/foreach} @@ -229,16 +229,16 @@ registration process.{/ts}

{if $participantCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} - {foreach from=$lineItem item=pcount} - {foreach from=$pcount item=p_count} - {assign var="count" value=$count+$p_count.participant_count} - {/foreach} - {/foreach} - {$count} + {assign var="count" value= 0} + {foreach from=$lineItem item=pcount} + {foreach from=$pcount item=p_count} + {assign var="count" value=$count+$p_count.participant_count} + {/foreach} + {/foreach} + {$count} {/if} diff --git a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl index 9d9e3cefef..87d982d7ab 100755 --- a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl +++ b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl @@ -145,7 +145,7 @@ registration process.{/ts} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $participantCount }===================={/if} diff --git a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl index 492b91ad2f..edda905918 100755 --- a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl @@ -178,7 +178,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $participantCount }{ts}Total Participants{/ts}{/if} + {if $participantCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -194,7 +194,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $participantCount }{$line.participant_count} {/if} + {if $participantCount }{$line.participant_count} {/if} {/foreach} @@ -218,17 +218,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $participantCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {foreach from=$pcount item=p_count} {assign var="count" value=$count+$p_count.participant_count} diff --git a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl index 4d0d7a3742..6202fae4b9 100755 --- a/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/3.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl @@ -145,7 +145,7 @@ registration process.{/ts} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $participantCount }===================={/if} diff --git a/CRM/Upgrade/3.2.alpha3.msg_template/message_templates/case_activity_html.tpl b/CRM/Upgrade/3.2.alpha3.msg_template/message_templates/case_activity_html.tpl index c1c5dd5f12..59dce775a2 100644 --- a/CRM/Upgrade/3.2.alpha3.msg_template/message_templates/case_activity_html.tpl +++ b/CRM/Upgrade/3.2.alpha3.msg_template/message_templates/case_activity_html.tpl @@ -37,20 +37,20 @@ {/if} - {if $editActURL} + {if $editActURL} - {ts}Edit this activity{/ts} + {ts}Edit this activity{/ts} {/if} {if $viewActURL} - {ts}View this activity{/ts} + {ts}View this activity{/ts} - - {/if} + + {/if} {foreach from=$activity.fields item=field} diff --git a/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_html.tpl b/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_html.tpl index 3de0115516..8749ee13af 100644 --- a/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_html.tpl +++ b/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_html.tpl @@ -1,104 +1,104 @@ - - - - - - - - -{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture} -{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture} -{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture} - -
- - - - - - - - - - - -
- - - - - {if $isCaseActivity} - - - - - {if $manageCaseURL} - - - - {/if} - {/if} - {if $editActURL} - - - - {/if} - {if $viewActURL} - - - - {/if} - {foreach from=$activity.fields item=field} - - - - - {/foreach} - - {foreach from=$activity.customGroups key=customGroupName item=customGroup} - - - - {foreach from=$customGroup item=field} - - - - - {/foreach} - {/foreach} -
- {ts}Activity Summary{/ts} - {$activityTypeName} -
- {ts}Your Case Role(s){/ts} - - {$contact.role} -
- {ts}Manage Case{/ts} -
- {ts}Edit this activity{/ts} -
- {ts}View this activity{/ts} -
- {$field.label}{if $field.category}({$field.category}){/if} - - {if $field.type eq 'Date'} - {$field.value|crmDate:$config->dateformatDatetime} - {else} - {$field.value} - {/if} -
- {$customGroupName} -
- {$field.label} - - {if $field.type eq 'Date'} - {$field.value|crmDate:$config->dateformatDatetime} - {else} - {$field.value} - {/if} -
-
-
- - + + + + + + + + +{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture} +{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture} +{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture} + +
+ + + + + + + + + + + +
+ + + + + {if $isCaseActivity} + + + + + {if $manageCaseURL} + + + + {/if} + {/if} + {if $editActURL} + + + + {/if} + {if $viewActURL} + + + + {/if} + {foreach from=$activity.fields item=field} + + + + + {/foreach} + + {foreach from=$activity.customGroups key=customGroupName item=customGroup} + + + + {foreach from=$customGroup item=field} + + + + + {/foreach} + {/foreach} +
+ {ts}Activity Summary{/ts} - {$activityTypeName} +
+ {ts}Your Case Role(s){/ts} + + {$contact.role} +
+ {ts}Manage Case{/ts} +
+ {ts}Edit this activity{/ts} +
+ {ts}View this activity{/ts} +
+ {$field.label}{if $field.category}({$field.category}){/if} + + {if $field.type eq 'Date'} + {$field.value|crmDate:$config->dateformatDatetime} + {else} + {$field.value} + {/if} +
+ {$customGroupName} +
+ {$field.label} + + {if $field.type eq 'Date'} + {$field.value|crmDate:$config->dateformatDatetime} + {else} + {$field.value} + {/if} +
+
+
+ + \ No newline at end of file diff --git a/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_text.tpl b/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_text.tpl index 2c7c4cc1e3..70cd0d7db8 100644 --- a/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_text.tpl +++ b/CRM/Upgrade/3.3.2.msg_template/message_templates/case_activity_text.tpl @@ -1,38 +1,38 @@ -=========================================================== -{ts}Activity Summary{/ts} - {$activityTypeName} -=========================================================== -{if $isCaseActivity} -{ts}Your Case Role(s){/ts} : {$contact.role} -{if $manageCaseURL} -{ts}Manage Case{/ts} : {$manageCaseURL} -{/if} -{/if} - -{if $editActURL} -{ts}Edit this Activity{/ts} : {$editActURL} -{/if} -{if $viewActURL} -{ts}View this Activity{/ts} : {$viewActURL} -{/if} - -{foreach from=$activity.fields item=field} -{if $field.type eq 'Date'} -{$field.label}{if $field.category}({$field.category}){/if} : {$field.value|crmDate:$config->dateformatDatetime} -{else} -{$field.label}{if $field.category}({$field.category}){/if} : {$field.value} -{/if} -{/foreach} - -{foreach from=$activity.customGroups key=customGroupName item=customGroup} -========================================================== -{$customGroupName} -========================================================== -{foreach from=$customGroup item=field} -{if $field.type eq 'Date'} -{$field.label} : {$field.value|crmDate:$config->dateformatDatetime} -{else} -{$field.label} : {$field.value} -{/if} -{/foreach} - +=========================================================== +{ts}Activity Summary{/ts} - {$activityTypeName} +=========================================================== +{if $isCaseActivity} +{ts}Your Case Role(s){/ts} : {$contact.role} +{if $manageCaseURL} +{ts}Manage Case{/ts} : {$manageCaseURL} +{/if} +{/if} + +{if $editActURL} +{ts}Edit this Activity{/ts} : {$editActURL} +{/if} +{if $viewActURL} +{ts}View this Activity{/ts} : {$viewActURL} +{/if} + +{foreach from=$activity.fields item=field} +{if $field.type eq 'Date'} +{$field.label}{if $field.category}({$field.category}){/if} : {$field.value|crmDate:$config->dateformatDatetime} +{else} +{$field.label}{if $field.category}({$field.category}){/if} : {$field.value} +{/if} +{/foreach} + +{foreach from=$activity.customGroups key=customGroupName item=customGroup} +========================================================== +{$customGroupName} +========================================================== +{foreach from=$customGroup item=field} +{if $field.type eq 'Date'} +{$field.label} : {$field.value|crmDate:$config->dateformatDatetime} +{else} +{$field.label} : {$field.value} +{/if} +{/foreach} + {/foreach} \ No newline at end of file diff --git a/CRM/Upgrade/3.3.2.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/3.3.2.msg_template/message_templates/membership_online_receipt_html.tpl index 0384ce7b24..a9e277caaf 100644 --- a/CRM/Upgrade/3.3.2.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/3.3.2.msg_template/message_templates/membership_online_receipt_html.tpl @@ -475,7 +475,6 @@ - diff --git a/CRM/Upgrade/3.3.3.msg_template/message_templates/contribution_recurring_notify_html.tpl b/CRM/Upgrade/3.3.3.msg_template/message_templates/contribution_recurring_notify_html.tpl index 315f0390e8..f9d715d5ab 100644 --- a/CRM/Upgrade/3.3.3.msg_template/message_templates/contribution_recurring_notify_html.tpl +++ b/CRM/Upgrade/3.3.3.msg_template/message_templates/contribution_recurring_notify_html.tpl @@ -27,7 +27,7 @@ {if $recur_txnType eq 'START'} {if $auto_renew_membership}

{ts}Thanks for your auto renew membership sign-up.{/ts}

-

{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed +

{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed every %1 %2(s). {/ts}

{else} @@ -41,7 +41,7 @@ {elseif $recur_txnType eq 'END'} {if $auto_renew_membership} -

{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}

+

{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}

{else}

{ts}Your recurring contribution term has ended.{/ts}

{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you for your support.{/ts}

diff --git a/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_html.tpl b/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_html.tpl index 5547ac0304..2d30dc11c7 100644 --- a/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_html.tpl +++ b/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_html.tpl @@ -1,6 +1,6 @@

Thank you for signing {$petition.title}.

-

In order to complete your signature, we must confirm your e-mail. +

In order to complete your signature, we must confirm your e-mail.
Please do so by visiting the following web page by clicking on the link below or pasting the link into your browser. diff --git a/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_text.tpl b/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_text.tpl index 0e3af09647..899e235f3f 100644 --- a/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_text.tpl +++ b/CRM/Upgrade/3.3.beta1.msg_template/message_templates/petition_confirmation_needed_text.tpl @@ -1,9 +1,9 @@ Thank you for signing {$petition.title}. -In order to complete your signature, we must confirm your e-mail. +In order to complete your signature, we must confirm your e-mail. Please do so by visiting the following web page by clicking on the link below or pasting the link into your browser. -Email confirmation page: {$petition.confirmUrl} +Email confirmation page: {$petition.confirmUrl} If you did not sign this petition, please ignore this message. diff --git a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_html.tpl b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_html.tpl index a427ea8d9f..7e6c5522b0 100644 --- a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_html.tpl +++ b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_html.tpl @@ -178,12 +178,12 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} - {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} + {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} {$line.qty} @@ -194,11 +194,11 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount } - - {$line.participant_count} + {if $pricesetFieldsCount } + + {$line.participant_count} - {/if} + {/if} {/foreach} @@ -229,10 +229,10 @@ registration process.{/ts}

{if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -241,11 +241,11 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} - {$count} + {$count} {/if} diff --git a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_text.tpl b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_text.tpl index 38b8f5c060..cfc17b293a 100644 --- a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_text.tpl +++ b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_offline_receipt_text.tpl @@ -145,14 +145,14 @@ registration process.{/ts} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $pricesetFieldsCount }===================={/if} diff --git a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_html.tpl index 8a2d2ca8cd..24e6cf49da 100644 --- a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_html.tpl @@ -178,7 +178,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -194,7 +194,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -218,17 +218,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -237,7 +237,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} diff --git a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_text.tpl index a6242680fe..1bfc5b0d35 100644 --- a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/event_online_receipt_text.tpl @@ -145,14 +145,14 @@ registration process.{/ts} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $pricesetFieldsCount }===================={/if} diff --git a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl index 1d9c3d60d9..8549b39b4c 100644 --- a/CRM/Upgrade/3.3.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl +++ b/CRM/Upgrade/3.3.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl @@ -1,8 +1,8 @@ Thank you for signing {$petition.title}. -In order to complete your signature, we must confirm your e-mail. +In order to complete your signature, we must confirm your e-mail. Please do so by visiting the following email confirmation web page: -{$petition.confirmUrlPlainText} +{$petition.confirmUrlPlainText} If you did not sign this petition, please ignore this message. diff --git a/CRM/Upgrade/3.4.3.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/3.4.3.msg_template/message_templates/membership_online_receipt_html.tpl index b4d9d1258d..a9800e053a 100644 --- a/CRM/Upgrade/3.4.3.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/3.4.3.msg_template/message_templates/membership_online_receipt_html.tpl @@ -318,7 +318,7 @@ {/foreach} {/if} - + {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} {if $is_pay_later} @@ -478,7 +478,7 @@ - + diff --git a/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_html.tpl index 9d608c726e..8f6227533f 100644 --- a/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_html.tpl @@ -177,7 +177,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -193,7 +193,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -217,17 +217,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -236,7 +236,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} @@ -385,8 +385,8 @@ registration process.{/ts}

{$customProfile.title.$pid} {foreach from=$eachProfile item=val key=field} {foreach from=$val item=v key=f} - {$field} - {$v} + {$field} + {$v} {/foreach} {/foreach} diff --git a/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_text.tpl index 680dd12c7e..5d714f8997 100644 --- a/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/3.4.5.msg_template/message_templates/event_online_receipt_text.tpl @@ -145,14 +145,14 @@ registration process.{/ts} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $pricesetFieldsCount }===================={/if} @@ -226,7 +226,7 @@ registration process.{/ts} {foreach from=$customPost item=customPos key=j} ==========================================================={if $pricesetFieldsCount }===================={/if} -{$customPost_grouptitle.$j} +{$customPost_grouptitle.$j} ==========================================================={if $pricesetFieldsCount }===================={/if} {foreach from=$customPos item=customValue key=customName} diff --git a/CRM/Upgrade/3.4.5.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/3.4.5.msg_template/message_templates/membership_online_receipt_html.tpl index fc579fee9f..5304917bdf 100644 --- a/CRM/Upgrade/3.4.5.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/3.4.5.msg_template/message_templates/membership_online_receipt_html.tpl @@ -317,7 +317,7 @@ {/foreach} {/if} - + {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} {if $is_pay_later} diff --git a/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_html.tpl b/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_html.tpl index f807ea9668..fd64489b85 100644 --- a/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_html.tpl +++ b/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_html.tpl @@ -97,13 +97,13 @@ {ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} - {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} + {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} {$line.qty} @@ -117,7 +117,7 @@ {$line.start_date} - + {$line.end_date} diff --git a/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_text.tpl b/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_text.tpl index 38478bd0ff..246f8fcb96 100644 --- a/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_text.tpl +++ b/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_offline_receipt_text.tpl @@ -53,7 +53,7 @@ {if $formValues.paidBy} {ts}Paid By{/ts}: {$formValues.paidBy} {if $formValues.check_number} -{ts}Check Number{/ts}: {$formValues.check_number} +{ts}Check Number{/ts}: {$formValues.check_number} {/if} {/if} {/if} diff --git a/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_online_receipt_html.tpl index 27fe0baadf..86045ef014 100644 --- a/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/3.4.6.msg_template/message_templates/membership_online_receipt_html.tpl @@ -175,8 +175,8 @@ {ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} @@ -195,7 +195,7 @@ {$line.start_date} - + {$line.end_date} @@ -356,7 +356,7 @@ {/foreach} {/if} - + {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} {if $is_pay_later} diff --git a/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_html.tpl b/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_html.tpl index 1ab774792f..a08797b05b 100644 --- a/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_html.tpl +++ b/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_html.tpl @@ -95,13 +95,13 @@ {ts}Item{/ts} {ts}Fee{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} - {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} + {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} {$line.line_total|crmMoney} @@ -109,7 +109,7 @@ {$line.start_date} - + {$line.end_date} diff --git a/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_text.tpl b/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_text.tpl index e766b577a3..e1cd9f0477 100644 --- a/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_text.tpl +++ b/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_offline_receipt_text.tpl @@ -51,7 +51,7 @@ {if $formValues.paidBy} {ts}Paid By{/ts}: {$formValues.paidBy} {if $formValues.check_number} -{ts}Check Number{/ts}: {$formValues.check_number} +{ts}Check Number{/ts}: {$formValues.check_number} {/if} {/if} {/if} diff --git a/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_online_receipt_html.tpl index 9446f42ad0..eef92f32d7 100644 --- a/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/3.4.7.msg_template/message_templates/membership_online_receipt_html.tpl @@ -173,8 +173,8 @@ {ts}Item{/ts} {ts}Fee{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} @@ -187,7 +187,7 @@ {$line.start_date} - + {$line.end_date} @@ -348,7 +348,7 @@ {/foreach} {/if} - + {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} {if $is_pay_later} diff --git a/CRM/Upgrade/3.4.beta2.msg_template/civicrm_msg_template.tpl b/CRM/Upgrade/3.4.beta2.msg_template/civicrm_msg_template.tpl index e67396e662..4f2ce6f5c8 100644 --- a/CRM/Upgrade/3.4.beta2.msg_template/civicrm_msg_template.tpl +++ b/CRM/Upgrade/3.4.beta2.msg_template/civicrm_msg_template.tpl @@ -1,15 +1,15 @@ -- CRM-7817 {if $addPetitionOptionGroup} -INSERT INTO `civicrm_option_group` - ( `name`, {localize field='label'}label{/localize}, {localize field='description'}description{/localize}, `is_reserved`, `is_active` ) -VALUES +INSERT INTO `civicrm_option_group` + ( `name`, {localize field='label'}label{/localize}, {localize field='description'}description{/localize}, `is_reserved`, `is_active` ) +VALUES ( 'msg_tpl_workflow_petition', {localize}'{ts escape="sql"}Message Template Workflow for Petition{/ts}'{/localize},{localize}'{ts escape="sql"}Message Template Workflow for Petition{/ts}'{/localize}, 0, 1 ); SELECT @option_group_id := MAX(id) from civicrm_option_group WHERE name = 'msg_tpl_workflow_petition'; -INSERT INTO `civicrm_option_value` - ( `option_group_id`, {localize field='label'}label{/localize}, `name`, `value`, `weight`, `is_active` ) +INSERT INTO `civicrm_option_value` + ( `option_group_id`, {localize field='label'}label{/localize}, `name`, `value`, `weight`, `is_active` ) VALUES ( @option_group_id, {localize}'{ts escape="sql"}Petition - signature added{/ts}'{/localize}, 'petition_sign', 1, 1, 1 ), ( @option_group_id, {localize}'{ts escape="sql"}Petition - need verification{/ts}'{/localize}, 'petition_confirmation_needed', 2, 2, 1 ); @@ -27,8 +27,8 @@ SELECT @tpl_ovid_petition_confirmation_needed := MAX(id) FROM civicrm_option_val {fetch assign=text_petition_confirmation_needed file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl"} {fetch assign=html_petition_confirmation_needed file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_html.tpl"} -INSERT INTO civicrm_msg_template - (msg_title, msg_subject, msg_text, msg_html, workflow_id, is_default, is_reserved) +INSERT INTO civicrm_msg_template + (msg_title, msg_subject, msg_text, msg_html, workflow_id, is_default, is_reserved) VALUES ( '{ts escape="sql"}Petition - signature added{/ts}', '{$subject_petition_sign|escape:"quotes"}', '{$text_petition_sign|escape:"quotes"}', '{$html_petition_sign|escape:"quotes"}', @tpl_ovid_petition_sign, 1, 0), diff --git a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_html.tpl index 423e26699e..4a6b89ed97 100644 --- a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_html.tpl @@ -178,7 +178,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -194,7 +194,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -218,17 +218,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -237,7 +237,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} diff --git a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_text.tpl index 54ad50ac27..c5bc46f328 100644 --- a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/event_online_receipt_text.tpl @@ -145,14 +145,14 @@ registration process.{/ts} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $pricesetFieldsCount }===================={/if} diff --git a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_html.tpl b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_html.tpl index 5547ac0304..2d30dc11c7 100644 --- a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_html.tpl +++ b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_html.tpl @@ -1,6 +1,6 @@

Thank you for signing {$petition.title}.

-

In order to complete your signature, we must confirm your e-mail. +

In order to complete your signature, we must confirm your e-mail.
Please do so by visiting the following web page by clicking on the link below or pasting the link into your browser. diff --git a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl index 1d9c3d60d9..8549b39b4c 100644 --- a/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl +++ b/CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_text.tpl @@ -1,8 +1,8 @@ Thank you for signing {$petition.title}. -In order to complete your signature, we must confirm your e-mail. +In order to complete your signature, we must confirm your e-mail. Please do so by visiting the following email confirmation web page: -{$petition.confirmUrlPlainText} +{$petition.confirmUrlPlainText} If you did not sign this petition, please ignore this message. diff --git a/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_html.tpl index fa3bb17d1c..331348c83c 100644 --- a/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_html.tpl @@ -21,13 +21,13 @@ -

Dear {contact.display_name},

+

Dear {contact.display_name},

{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}

{$event.confirm_email_text|htmlize}

{else} -

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

+

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

{/if} @@ -72,20 +72,20 @@ registration process.{/ts}

{if $conference_sessions} - {ts}Your schedule:{/ts} + {ts}Your schedule:{/ts} - {assign var='group_by_day' value='NA'} - {foreach from=$conference_sessions item=session} - {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} - {assign var='group_by_day' value=$session.start_date} + {assign var='group_by_day' value='NA'} + {foreach from=$conference_sessions item=session} + {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} + {assign var='group_by_day' value=$session.start_date} {$group_by_day|date_format:"%m/%d/%Y"}
- {/if} - {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
- {if $session.location}    {$session.location}
{/if} - {/foreach} + {/if} + {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location}    {$session.location}
{/if} + {/foreach} {/if} @@ -192,7 +192,7 @@ registration process.{/ts}

- {$payer.name} + {$payer.name} {/if} @@ -224,7 +224,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -240,7 +240,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -264,17 +264,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -283,7 +283,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} @@ -433,8 +433,8 @@ registration process.{/ts}

{$customProfile.title.$pid} {foreach from=$eachProfile item=val key=field} {foreach from=$val item=v key=f} - {$field} - {$v} + {$field} + {$v} {/foreach} {/foreach} @@ -461,7 +461,7 @@ registration process.{/ts}

{/foreach} {/foreach} {/if} - + diff --git a/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_text.tpl index acadb4f1f0..750dd0b93f 100644 --- a/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/4.1.alpha1.msg_template/message_templates/event_online_receipt_text.tpl @@ -172,14 +172,14 @@ You were registered by: {$payer.name} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later} ==========================================================={if $pricesetFieldsCount }===================={/if} @@ -252,7 +252,7 @@ You were registered by: {$payer.name} {foreach from=$customPost item=customPos key=j} ==========================================================={if $pricesetFieldsCount }===================={/if} -{$customPost_grouptitle.$j} +{$customPost_grouptitle.$j} ==========================================================={if $pricesetFieldsCount }===================={/if} {foreach from=$customPos item=customValue key=customName} diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/civicrm_msg_template.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/civicrm_msg_template.tpl index d7be75a354..9f7a745490 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/civicrm_msg_template.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/civicrm_msg_template.tpl @@ -1,11 +1,11 @@ {php} $dir = SMARTY_DIR . '/../../CRM/Upgrade/4.2.alpha1.msg_template/message_templates'; - + $ovNames = array( 'contribution' => array( 'contribution_recurring_cancelled' => ts('Contributions - Recurring Cancellation Notification', array('escape' => 'sql')), 'contribution_recurring_billing' => ts('Contributions - Recurring Billing Updates', array('escape' => 'sql')), - 'contribution_recurring_edit' => ts('Contributions - Recurring Updates', array('escape' => 'sql')), + 'contribution_recurring_edit' => ts('Contributions - Recurring Updates', array('escape' => 'sql')), ), 'membership' => array( 'membership_autorenew_cancelled' => ts('Memberships - Auto-renew Cancellation Notification', array('escape' => 'sql')), @@ -13,8 +13,8 @@ ), ); - $ignoreTemplate = array_merge(array_keys($ovNames['contribution']), array_keys($ovNames['membership'])); - + $ignoreTemplate = array_merge(array_keys($ovNames['contribution']), array_keys($ovNames['membership'])); + $this->assign('ovNames', $ovNames); $this->assign('dir', $dir); $templates = array(); diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_billing_html.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_billing_html.tpl index 3e3ad1b6fc..f2b9d48842 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_billing_html.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_billing_html.tpl @@ -58,7 +58,7 @@ {ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} - + diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_edit_text.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_edit_text.tpl index 71a02ccbc1..423b00c9cd 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_edit_text.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_edit_text.tpl @@ -1,8 +1,8 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{ts 1=$contact.display_name}Dear %1{/ts}, -{ts}Your recurring contribution has been updated as requested:{/ts} +{ts}Your recurring contribution has been updated as requested:{/ts} {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Recurring contribution is for %1, every %2(s) %3{/ts} -{if $installments}{ts 1=$installments} for %1 installments.{/ts}{/if} +{if $installments}{ts 1=$installments} for %1 installments.{/ts}{/if} {ts 1=$receipt_from_email}If you have questions please contact us at %1.{/ts} \ No newline at end of file diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_html.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_html.tpl index fc8513b2d7..3a6b18bac1 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_html.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_html.tpl @@ -67,7 +67,7 @@ - {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments details for this recurring contribution by visiting this web page.{/ts} + {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments details for this recurring contribution by visiting this web page.{/ts} {/if} @@ -77,7 +77,7 @@ {if $auto_renew_membership} -

{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}

+

{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}

{else} diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_text.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_text.tpl index 86602b7b40..5f54ca1568 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_text.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/contribution_recurring_notify_text.tpl @@ -10,7 +10,7 @@ {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by visiting this web page.{/ts} {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts} - + {else} {ts}Thanks for your recurring contribution sign-up.{/ts} diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl index 40eb560bdb..1081ba353e 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_html.tpl @@ -21,13 +21,13 @@ -

Dear {contact.display_name},

+

Dear {contact.display_name},

{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}

{$event.confirm_email_text|htmlize}

{else} -

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

+

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

{/if} @@ -72,20 +72,20 @@ registration process.{/ts}

{if $conference_sessions} - {ts}Your schedule:{/ts} + {ts}Your schedule:{/ts} - {assign var='group_by_day' value='NA'} - {foreach from=$conference_sessions item=session} - {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} - {assign var='group_by_day' value=$session.start_date} + {assign var='group_by_day' value='NA'} + {foreach from=$conference_sessions item=session} + {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} + {assign var='group_by_day' value=$session.start_date} {$group_by_day|date_format:"%m/%d/%Y"}
- {/if} - {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
- {if $session.location}    {$session.location}
{/if} - {/foreach} + {/if} + {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location}    {$session.location}
{/if} + {/foreach} {/if} @@ -180,7 +180,7 @@ registration process.{/ts}

- {$payer.name} + {$payer.name} {/if} @@ -212,7 +212,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -228,7 +228,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -243,17 +243,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -262,7 +262,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} @@ -412,8 +412,8 @@ registration process.{/ts}

{$customProfile.title.$pid} {foreach from=$eachProfile item=val key=field} {foreach from=$val item=v key=f} - {$field} - {$v} + {$field} + {$v} {/foreach} {/foreach} @@ -440,7 +440,6 @@ registration process.{/ts}

{/foreach} {/foreach} {/if} - diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl index 31e1cda915..6b0a012826 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/event_online_receipt_text.tpl @@ -158,14 +158,14 @@ You were registered by: {$payer.name} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later} ==========================================================={if $pricesetFieldsCount }===================={/if} @@ -238,7 +238,7 @@ You were registered by: {$payer.name} {foreach from=$customPost item=customPos key=j} ==========================================================={if $pricesetFieldsCount }===================={/if} -{$customPost_grouptitle.$j} +{$customPost_grouptitle.$j} ==========================================================={if $pricesetFieldsCount }===================={/if} {foreach from=$customPos item=customValue key=customName} diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_autorenew_billing_html.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_autorenew_billing_html.tpl index 9997c5ef09..0277abcb0d 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_autorenew_billing_html.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_autorenew_billing_html.tpl @@ -58,8 +58,7 @@ {ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} - - + diff --git a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl index d9e13ad2d0..7182d55d9d 100644 --- a/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/4.2.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl @@ -173,8 +173,8 @@ {ts}Item{/ts} {ts}Fee{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} @@ -187,7 +187,7 @@ {$line.start_date} - + {$line.end_date} diff --git a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_html.tpl b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_html.tpl index edf6912132..6594f137eb 100644 --- a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_html.tpl +++ b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_html.tpl @@ -178,12 +178,12 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} - {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} + {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} {$line.qty} @@ -194,11 +194,11 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount } - - {$line.participant_count} + {if $pricesetFieldsCount } + + {$line.participant_count} - {/if} + {/if} {/foreach} @@ -228,10 +228,10 @@ registration process.{/ts}

{if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -240,11 +240,11 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} - {$count} + {$count} {/if} diff --git a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_text.tpl b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_text.tpl index 38b8f5c060..cfc17b293a 100644 --- a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_text.tpl +++ b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_offline_receipt_text.tpl @@ -145,14 +145,14 @@ registration process.{/ts} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $pricesetFieldsCount }===================={/if} diff --git a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_html.tpl index 03beabaf04..b1aa30888d 100644 --- a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_html.tpl @@ -21,13 +21,13 @@ -

Dear {contact.display_name},

+

Dear {contact.display_name},

{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}

{$event.confirm_email_text|htmlize}

{else} -

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

+

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

{/if} @@ -72,20 +72,20 @@ registration process.{/ts}

{if $conference_sessions} - {ts}Your schedule:{/ts} + {ts}Your schedule:{/ts} - {assign var='group_by_day' value='NA'} - {foreach from=$conference_sessions item=session} - {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} - {assign var='group_by_day' value=$session.start_date} + {assign var='group_by_day' value='NA'} + {foreach from=$conference_sessions item=session} + {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} + {assign var='group_by_day' value=$session.start_date} {$group_by_day|date_format:"%m/%d/%Y"}
- {/if} - {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
- {if $session.location}    {$session.location}
{/if} - {/foreach} + {/if} + {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location}    {$session.location}
{/if} + {/foreach} {/if} @@ -180,7 +180,7 @@ registration process.{/ts}

- {$payer.name} + {$payer.name} {/if} @@ -212,7 +212,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -228,7 +228,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -252,17 +252,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -271,7 +271,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} @@ -421,8 +421,8 @@ registration process.{/ts}

{$customProfile.title.$pid} {foreach from=$eachProfile item=val key=field} {foreach from=$val item=v key=f} - {$field} - {$v} + {$field} + {$v} {/foreach} {/foreach} @@ -449,7 +449,7 @@ registration process.{/ts}

{/foreach} {/foreach} {/if} - + diff --git a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_text.tpl index d9f623fdbf..a566174736 100644 --- a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/event_online_receipt_text.tpl @@ -162,14 +162,14 @@ You were registered by: {$payer.name} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later} ==========================================================={if $pricesetFieldsCount }===================={/if} @@ -242,7 +242,7 @@ You were registered by: {$payer.name} {foreach from=$customPost item=customPos key=j} ==========================================================={if $pricesetFieldsCount }===================={/if} -{$customPost_grouptitle.$j} +{$customPost_grouptitle.$j} ==========================================================={if $pricesetFieldsCount }===================={/if} {foreach from=$customPos item=customValue key=customName} diff --git a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/membership_offline_receipt_text.tpl b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/membership_offline_receipt_text.tpl index a447f798c9..939e75252e 100644 --- a/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/membership_offline_receipt_text.tpl +++ b/CRM/Upgrade/4.2.alpha2.msg_template/message_templates/membership_offline_receipt_text.tpl @@ -51,7 +51,7 @@ {if $formValues.paidBy} {ts}Paid By{/ts}: {$formValues.paidBy} {if $formValues.check_number} -{ts}Check Number{/ts}: {$formValues.check_number} +{ts}Check Number{/ts}: {$formValues.check_number} {/if} {/if} {/if} diff --git a/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_html.tpl index 9bf99de021..eca14846a1 100644 --- a/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_html.tpl @@ -21,13 +21,13 @@ -

Dear {contact.display_name},

+

Dear {contact.display_name},

{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}

{$event.confirm_email_text|htmlize}

{else} -

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

+

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

{/if} @@ -72,20 +72,20 @@ registration process.{/ts}

{if $conference_sessions} - {ts}Your schedule:{/ts} + {ts}Your schedule:{/ts} - {assign var='group_by_day' value='NA'} - {foreach from=$conference_sessions item=session} - {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} - {assign var='group_by_day' value=$session.start_date} + {assign var='group_by_day' value='NA'} + {foreach from=$conference_sessions item=session} + {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} + {assign var='group_by_day' value=$session.start_date} {$group_by_day|date_format:"%m/%d/%Y"}
- {/if} - {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
- {if $session.location}    {$session.location}
{/if} - {/foreach} + {/if} + {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location}    {$session.location}
{/if} + {/foreach} {/if} @@ -180,7 +180,7 @@ registration process.{/ts}

- {$payer.name} + {$payer.name} {/if} @@ -212,7 +212,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -228,7 +228,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -252,17 +252,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -271,7 +271,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} @@ -414,8 +414,8 @@ registration process.{/ts}

{$customProfile.title.$pid} {foreach from=$eachProfile item=val key=field} {foreach from=$val item=v key=f} - {$field} - {$v} + {$field} + {$v} {/foreach} {/foreach} @@ -442,7 +442,7 @@ registration process.{/ts}

{/foreach} {/foreach} {/if} - + diff --git a/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_text.tpl index e11bf6692d..2a6e11ff7a 100644 --- a/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/4.2.beta3.msg_template/message_templates/event_online_receipt_text.tpl @@ -162,14 +162,14 @@ You were registered by: {$payer.name} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $register_date} {ts}Registration Date{/ts}: {$register_date|crmDate} {/if} @@ -233,7 +233,7 @@ You were registered by: {$payer.name} {foreach from=$customPost item=customPos key=j} ==========================================================={if $pricesetFieldsCount }===================={/if} -{$customPost_grouptitle.$j} +{$customPost_grouptitle.$j} ==========================================================={if $pricesetFieldsCount }===================={/if} {foreach from=$customPos item=customValue key=customName} diff --git a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl index c0263439e4..da8df90665 100644 --- a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl +++ b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_html.tpl @@ -178,12 +178,12 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} - {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} + {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} {$line.qty} @@ -194,11 +194,11 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount } - - {$line.participant_count} + {if $pricesetFieldsCount } + + {$line.participant_count} - {/if} + {/if} {/foreach} @@ -228,10 +228,10 @@ registration process.{/ts}

{if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -240,11 +240,11 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} - {$count} + {$count} {/if} diff --git a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl index b591f22361..0890ed6e8c 100644 --- a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl +++ b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_offline_receipt_text.tpl @@ -145,14 +145,14 @@ registration process.{/ts} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $is_pay_later } ==========================================================={if $pricesetFieldsCount }===================={/if} diff --git a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_html.tpl index 512400a643..badc5163d2 100644 --- a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_html.tpl @@ -21,13 +21,13 @@ -

Dear {contact.display_name},

+

Dear {contact.display_name},

{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}

{$event.confirm_email_text|htmlize}

{else} -

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

+

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

{/if} @@ -72,20 +72,20 @@ registration process.{/ts}

{if $conference_sessions} - {ts}Your schedule:{/ts} + {ts}Your schedule:{/ts} - {assign var='group_by_day' value='NA'} - {foreach from=$conference_sessions item=session} - {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} - {assign var='group_by_day' value=$session.start_date} + {assign var='group_by_day' value='NA'} + {foreach from=$conference_sessions item=session} + {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} + {assign var='group_by_day' value=$session.start_date} {$group_by_day|date_format:"%m/%d/%Y"}
- {/if} - {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
- {if $session.location}    {$session.location}
{/if} - {/foreach} + {/if} + {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location}    {$session.location}
{/if} + {/foreach} {/if} @@ -180,7 +180,7 @@ registration process.{/ts}

- {$payer.name} + {$payer.name} {/if} @@ -212,7 +212,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -228,7 +228,7 @@ registration process.{/ts}

{$line.line_total|crmMoney} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -252,17 +252,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -271,7 +271,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} @@ -414,8 +414,8 @@ registration process.{/ts}

{$customProfile.title.$pid} {foreach from=$eachProfile item=val key=field} {foreach from=$val item=v key=f} - {$field} - {$v} + {$field} + {$v} {/foreach} {/foreach} @@ -442,7 +442,7 @@ registration process.{/ts}

{/foreach} {/foreach} {/if} - + diff --git a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_text.tpl index 8e3a5e40c6..885196ce83 100644 --- a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/event_online_receipt_text.tpl @@ -162,14 +162,14 @@ You were registered by: {$payer.name} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $register_date} {ts}Registration Date{/ts}: {$register_date|crmDate} {/if} @@ -233,7 +233,7 @@ You were registered by: {$payer.name} {foreach from=$customPost item=customPos key=j} ==========================================================={if $pricesetFieldsCount }===================={/if} -{$customPost_grouptitle.$j} +{$customPost_grouptitle.$j} ==========================================================={if $pricesetFieldsCount }===================={/if} {foreach from=$customPos item=customValue key=customName} diff --git a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_html.tpl b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_html.tpl index 280d70930d..da729d4433 100644 --- a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_html.tpl +++ b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_html.tpl @@ -95,13 +95,13 @@ {ts}Item{/ts} {ts}Fee{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} - {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} + {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} {$line.line_total|crmMoney} @@ -109,7 +109,7 @@ {$line.start_date} - + {$line.end_date} diff --git a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl index 84e9730464..812606bdce 100644 --- a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl +++ b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_offline_receipt_text.tpl @@ -51,7 +51,7 @@ {if $formValues.paidBy} {ts}Paid By{/ts}: {$formValues.paidBy} {if $formValues.check_number} -{ts}Check Number{/ts}: {$formValues.check_number} +{ts}Check Number{/ts}: {$formValues.check_number} {/if} {/if} {/if} diff --git a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl index fc46a888a9..c56152bbaa 100644 --- a/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/4.3.alpha1.msg_template/message_templates/membership_online_receipt_html.tpl @@ -171,8 +171,8 @@ {ts}Item{/ts} {ts}Fee{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} @@ -185,7 +185,7 @@ {$line.start_date} - + {$line.end_date} diff --git a/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_html.tpl index 47d76c637e..978e9f6799 100644 --- a/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_html.tpl +++ b/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_html.tpl @@ -21,13 +21,12 @@ -

Dear {contact.display_name},

+

Dear {contact.display_name},

{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}

{$event.confirm_email_text|htmlize}

- {else} -

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

+

Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $isOnWaitlist}waitlisted{else}registered{/if} for the following:

{/if} @@ -72,20 +71,20 @@ registration process.{/ts}

{if $conference_sessions} - {ts}Your schedule:{/ts} + {ts}Your schedule:{/ts} - {assign var='group_by_day' value='NA'} - {foreach from=$conference_sessions item=session} - {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} - {assign var='group_by_day' value=$session.start_date} + {assign var='group_by_day' value='NA'} + {foreach from=$conference_sessions item=session} + {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"} + {assign var='group_by_day' value=$session.start_date} {$group_by_day|date_format:"%m/%d/%Y"}
- {/if} - {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
- {if $session.location}    {$session.location}
{/if} - {/foreach} + {/if} + {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location}    {$session.location}
{/if} + {/foreach} {/if} @@ -180,7 +179,7 @@ registration process.{/ts}

- {$payer.name} + {$payer.name} {/if} @@ -212,7 +211,7 @@ registration process.{/ts}

{ts}Qty{/ts} {ts}Each{/ts} {ts}Total{/ts} - {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} + {if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if} {foreach from=$value item=line} @@ -228,7 +227,7 @@ registration process.{/ts}

{$line.line_total|crmMoney:$currency} - {if $pricesetFieldsCount }{$line.participant_count} {/if} + {if $pricesetFieldsCount }{$line.participant_count} {/if} {/foreach} @@ -252,17 +251,17 @@ registration process.{/ts}

{ts}Total Amount{/ts} - + {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if} {if $pricesetFieldsCount } - - {ts}Total Participants{/ts} + + {ts}Total Participants{/ts} - {assign var="count" value= 0} + {assign var="count" value= 0} {foreach from=$lineItem item=pcount} {assign var="lineItemCount" value=0} {if $pcount neq 'skip'} @@ -271,7 +270,7 @@ registration process.{/ts}

{/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} @@ -414,8 +413,8 @@ registration process.{/ts}

{$customProfile.title.$pid} {foreach from=$eachProfile item=val key=field} {foreach from=$val item=v key=f} - {$field} - {$v} + {$field} + {$v} {/foreach} {/foreach} @@ -442,7 +441,7 @@ registration process.{/ts}

{/foreach} {/foreach} {/if} - + diff --git a/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_text.tpl index 4628f63b77..dda94891ef 100644 --- a/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_text.tpl +++ b/CRM/Upgrade/4.3.alpha3.msg_template/message_templates/event_online_receipt_text.tpl @@ -162,14 +162,14 @@ You were registered by: {$payer.name} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} - {/if} + {/if} {assign var="count" value=$count+$lineItemCount} {/if} {/foreach} {ts}Total Participants{/ts}: {$count} {/if} - + {if $register_date} {ts}Registration Date{/ts}: {$register_date|crmDate} {/if} @@ -233,7 +233,7 @@ You were registered by: {$payer.name} {foreach from=$customPost item=customPos key=j} ==========================================================={if $pricesetFieldsCount }===================={/if} -{$customPost_grouptitle.$j} +{$customPost_grouptitle.$j} ==========================================================={if $pricesetFieldsCount }===================={/if} {foreach from=$customPos item=customValue key=customName} diff --git a/CRM/Upgrade/4.3.beta1.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/4.3.beta1.msg_template/message_templates/membership_online_receipt_html.tpl index fc46a888a9..c56152bbaa 100644 --- a/CRM/Upgrade/4.3.beta1.msg_template/message_templates/membership_online_receipt_html.tpl +++ b/CRM/Upgrade/4.3.beta1.msg_template/message_templates/membership_online_receipt_html.tpl @@ -171,8 +171,8 @@ {ts}Item{/ts} {ts}Fee{/ts} - {ts}Membership Start Date{/ts} - {ts}Membership End Date{/ts} + {ts}Membership Start Date{/ts} + {ts}Membership End Date{/ts} {foreach from=$value item=line} @@ -185,7 +185,7 @@ {$line.start_date} - + {$line.end_date} diff --git a/CRM/Upgrade/4.3.beta3.msg_template/message_templates/contribution_online_receipt_html.tpl b/CRM/Upgrade/4.3.beta3.msg_template/message_templates/contribution_online_receipt_html.tpl index 976c24ad46..48bde393ba 100644 --- a/CRM/Upgrade/4.3.beta3.msg_template/message_templates/contribution_online_receipt_html.tpl +++ b/CRM/Upgrade/4.3.beta3.msg_template/message_templates/contribution_online_receipt_html.tpl @@ -137,7 +137,7 @@ {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts} - {/if} + {/if} diff --git a/CRM/Upgrade/Incremental/Legacy.php b/CRM/Upgrade/Incremental/Legacy.php index 944655034d..79bbafc1d4 100644 --- a/CRM/Upgrade/Incremental/Legacy.php +++ b/CRM/Upgrade/Incremental/Legacy.php @@ -56,8 +56,8 @@ class CRM_Upgrade_Incremental_Legacy { ) ) { $query = " -SELECT id - FROM civicrm_mailing_job +SELECT id + FROM civicrm_mailing_job WHERE status NOT IN ( 'Complete', 'Canceled' ) AND is_test = 0 LIMIT 1"; $mjId = CRM_Core_DAO::singleValueQuery($query); if ($mjId) { @@ -206,8 +206,8 @@ SELECT id if ($rev == '3.2.beta4') { $statuses = array('New', 'Current', 'Grace', 'Expired', 'Pending', 'Cancelled', 'Deceased'); $sql = " -SELECT count( id ) as statusCount - FROM civicrm_membership_status +SELECT count( id ) as statusCount + FROM civicrm_membership_status WHERE name IN ( '" . implode("' , '", $statuses) . "' ) "; $count = CRM_Core_DAO::singleValueQuery($sql); if ($count < count($statuses)) { @@ -409,7 +409,7 @@ SELECT count( id ) as statusCount static function upgrade_2_2_7($rev) { $upgrade = new CRM_Upgrade_Form(); $upgrade->processSQL($rev); - $sql = "UPDATE civicrm_report_instance + $sql = "UPDATE civicrm_report_instance SET form_values = REPLACE(form_values,'#',';') "; CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray); diff --git a/CRM/Upgrade/Incremental/php/ThreeFour.php b/CRM/Upgrade/Incremental/php/ThreeFour.php index dfa3add5db..750c7b320c 100644 --- a/CRM/Upgrade/Incremental/php/ThreeFour.php +++ b/CRM/Upgrade/Incremental/php/ThreeFour.php @@ -1,5 +1,4 @@ 'before', 'event' => 'update'), array('when' => 'before', 'event' => 'insert')); - + // FIXME: Doing require_once is a must here because a call like CRM_Core_I18n_SchemaStructure_3_4_beta2 makes // class loader look for file like - CRM/Core/I18n/SchemaStructure/3/4/beta2.php which is not what we want to be loaded require_once "CRM/Core/I18n/SchemaStructure_3_4_beta2.php"; @@ -283,11 +282,11 @@ INSERT INTO civicrm_location_type ( name, description, is_reserved, is_active ) $bulkEmailActivityType = CRM_Core_DAO::singleValueQuery(" SELECT v.id -FROM civicrm_option_value v, - civicrm_option_group g -WHERE v.option_group_id = g.id - AND g.name = %1 - AND g.is_active = 1 +FROM civicrm_option_value v, + civicrm_option_group g +WHERE v.option_group_id = g.id + AND g.name = %1 + AND g.is_active = 1 AND v.name = %2", array(1 => array('activity_type', 'String'), 2 => array('Bulk Email', 'String'), )); @@ -308,10 +307,10 @@ WHERE v.option_group_id = g.id } $pages = CRM_Core_DAO::executeQuery(" -SELECT civicrm_contribution_page.id +SELECT civicrm_contribution_page.id FROM civicrm_contribution_page -LEFT JOIN civicrm_uf_join ON entity_table = 'civicrm_contribution_page' AND entity_id = civicrm_contribution_page.id AND module = 'OnBehalf' -WHERE is_for_organization = 1 +LEFT JOIN civicrm_uf_join ON entity_table = 'civicrm_contribution_page' AND entity_id = civicrm_contribution_page.id AND module = 'OnBehalf' +WHERE is_for_organization = 1 AND civicrm_uf_join.id IS NULL "); diff --git a/CRM/Upgrade/Incremental/php/ThreeTwo.php b/CRM/Upgrade/Incremental/php/ThreeTwo.php index 75d3367027..21de1bfc9a 100644 --- a/CRM/Upgrade/Incremental/php/ThreeTwo.php +++ b/CRM/Upgrade/Incremental/php/ThreeTwo.php @@ -1,5 +1,4 @@ 1 ) dup_cat - ON ( cat.activity_id = dup_cat.activity_id - AND cat.target_contact_id = dup_cat.target_contact_id + + DELETE cat.* FROM civicrm_activity_target cat + INNER JOIN ( SELECT id, activity_id, target_contact_id + FROM civicrm_activity_target + GROUP BY activity_id, target_contact_id HAVING count(*) > 1 ) dup_cat + ON ( cat.activity_id = dup_cat.activity_id + AND cat.target_contact_id = dup_cat.target_contact_id AND cat.id <> dup_cat.id ); - DELETE caa.* FROM civicrm_activity_assignment caa - INNER JOIN ( SELECT id, activity_id, assignee_contact_id - FROM civicrm_activity_assignment - GROUP BY activity_id, assignee_contact_id HAVING count(*) > 1 ) dup_caa - ON ( caa.activity_id = dup_caa.activity_id - AND caa.assignee_contact_id = dup_caa.assignee_contact_id + DELETE caa.* FROM civicrm_activity_assignment caa + INNER JOIN ( SELECT id, activity_id, assignee_contact_id + FROM civicrm_activity_assignment + GROUP BY activity_id, assignee_contact_id HAVING count(*) > 1 ) dup_caa + ON ( caa.activity_id = dup_caa.activity_id + AND caa.assignee_contact_id = dup_caa.assignee_contact_id AND caa.id <> dup_caa.id ); -- Drop unique indexes of activity_target and activity_assignment - ALTER TABLE civicrm_activity_assignment + ALTER TABLE civicrm_activity_assignment DROP INDEX `UI_activity_assignee_contact_id` , ADD UNIQUE INDEX `UI_activity_assignee_contact_id` (`assignee_contact_id`,`activity_id`); - ALTER TABLE civicrm_activity_target + ALTER TABLE civicrm_activity_target DROP INDEX `UI_activity_target_contact_id` , ADD UNIQUE INDEX `UI_activity_target_contact_id` (`target_contact_id`,`activity_id`); diff --git a/CRM/Upgrade/Incremental/sql/3.0.4.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.0.4.mysql.tpl index 3a6a3a6041..432f44ec2c 100644 --- a/CRM/Upgrade/Incremental/sql/3.0.4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.0.4.mysql.tpl @@ -7,7 +7,7 @@ SELECT @maxWeight := MAX(ROUND(weight)) FROM civicrm_membership_status; VALUES ( {foreach from=$locales item=locale}'Deceased',{/foreach} 0, 1, 1, 1, (SELECT @maxWeight := @maxWeight + 1), 0 ); {else} - INSERT INTO civicrm_membership_status + INSERT INTO civicrm_membership_status ( name, is_current_member, is_admin, is_active, is_reserved, weight, is_default ) VALUES ( 'Deceased', 0, 1, 1, 1, (SELECT @maxWeight := @maxWeight + 1), 0 ); diff --git a/CRM/Upgrade/Incremental/sql/3.0.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.0.alpha1.mysql.tpl index 984d8fc998..b32d5005ff 100644 --- a/CRM/Upgrade/Incremental/sql/3.0.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.0.alpha1.mysql.tpl @@ -2,27 +2,27 @@ -- CRM-4048 -- modify visibility of civicrm_group - ALTER TABLE `civicrm_group` + ALTER TABLE `civicrm_group` MODIFY `visibility` enum('User and User Admin Only','Public User Pages','Public User Pages and Listings', 'Public Pages') collate utf8_unicode_ci default 'User and User Admin Only' COMMENT 'In what context(s) is this field visible.'; UPDATE civicrm_group SET visibility = 'Public Pages' WHERE visibility IN ('Public User Pages', 'Public User Pages and Listings'); - ALTER TABLE `civicrm_group` + ALTER TABLE `civicrm_group` MODIFY `visibility` enum('User and User Admin Only', 'Public Pages') collate utf8_unicode_ci default 'User and User Admin Only' COMMENT 'In what context(s) is this field visible.'; -- Modify visibility of civicrm_uf_field - ALTER TABLE `civicrm_uf_field` + ALTER TABLE `civicrm_uf_field` MODIFY `visibility` enum('User and User Admin Only','Public User Pages','Public User Pages and Listings', 'Public Pages', 'Public Pages and Listings') collate utf8_unicode_ci default 'User and User Admin Only' COMMENT 'In what context(s) is this field visible.'; UPDATE civicrm_uf_field SET visibility = 'Public Pages' WHERE visibility = 'Public User Pages'; UPDATE civicrm_uf_field SET visibility = 'Public Pages and Listings' WHERE visibility = 'Public User Pages and Listings'; - ALTER TABLE `civicrm_uf_field` + ALTER TABLE `civicrm_uf_field` MODIFY `visibility` enum('User and User Admin Only', 'Public Pages', 'Public Pages and Listings') collate utf8_unicode_ci default 'User and User Admin Only' COMMENT 'In what context(s) is this field visible.'; -- CRM-3336 - -- Add two label_a_b and label_b_a column in civicrm_relationship_type table + -- Add two label_a_b and label_b_a column in civicrm_relationship_type table ALTER TABLE `civicrm_relationship_type` ADD `label_a_b` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT 'label for relationship of contact_a to contact_b.' AFTER `name_a_b`, ADD `label_b_a` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT 'Optional label for relationship of contact_b to contact_a.' AFTER `name_b_a`; @@ -31,7 +31,7 @@ UPDATE civicrm_relationship_type SET civicrm_relationship_type.label_a_b = civicrm_relationship_type.name_a_b, civicrm_relationship_type.label_b_a = civicrm_relationship_type.name_b_a; - -- Alter comment of name_a_b and name_b_a column in civicrm_relationship_type table + -- Alter comment of name_a_b and name_b_a column in civicrm_relationship_type table ALTER TABLE `civicrm_relationship_type` CHANGE `name_a_b` `name_a_b` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'name for relationship of contact_a to contact_b.' , CHANGE `name_b_a` `name_b_a` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Optional name for relationship of contact_b to contact_a.'; @@ -42,10 +42,10 @@ -- migrate participant status types, CRM-4321 - + -- /******************************************************* - -- * civicrm_participant_status_type - -- * various types of CiviEvent participant statuses + -- * civicrm_participant_status_type + -- * various types of CiviEvent participant statuses -- *******************************************************/ BEGIN; CREATE TABLE civicrm_participant_status_type ( @@ -68,14 +68,14 @@ FROM civicrm_option_value WHERE option_group_id = @ps_ogid; UPDATE civicrm_participant_status_type - SET class = CASE name + SET class = CASE name WHEN 'Registered' THEN 'Positive' WHEN 'Attended' THEN 'Positive' WHEN 'No-show' THEN 'Negative' WHEN 'Cancelled' THEN 'Negative' ELSE 'Pending' END; - + UPDATE civicrm_participant_status_type SET name = 'Pending from pay later', {localize field='label'}label = 'Pending from pay later'{/localize} WHERE name = 'Pending'; @@ -98,7 +98,7 @@ DELETE FROM civicrm_option_value WHERE option_group_id = @ps_ogid; DELETE FROM civicrm_option_group WHERE id = @ps_ogid; - + UPDATE civicrm_participant SET status_id = 1 WHERE status_id IS NULL; ALTER TABLE `civicrm_participant` CHANGE `status_id` `status_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.', @@ -107,12 +107,12 @@ COMMIT; -- Add is_reserved, name column to civicrm_uf_group table. - ALTER TABLE `civicrm_uf_group` + ALTER TABLE `civicrm_uf_group` ADD `is_reserved` TINYINT( 4 ) NULL DEFAULT NULL COMMENT 'Is this group reserved for use by some other CiviCRM functionality?', ADD `name` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT 'Name of the UF group for directly addressing it in the codebase'; -- Add is_reserved column to civicrm_uf_field. - ALTER TABLE `civicrm_uf_field` + ALTER TABLE `civicrm_uf_field` ADD `is_reserved` TINYINT( 4 ) NULL DEFAULT NULL COMMENT 'Is this group reserved for use by some other CiviCRM functionality?'; -- add a profile for CRM-4323 @@ -150,12 +150,12 @@ -- CRM-5333 -- Drop unique indexes of activity_target and activity_assignment - - ALTER TABLE civicrm_activity_assignment + + ALTER TABLE civicrm_activity_assignment DROP INDEX `UI_activity_assignee_contact_id` , ADD INDEX `UI_activity_assignee_contact_id` (`assignee_contact_id`,`activity_id`); - ALTER TABLE civicrm_activity_target + ALTER TABLE civicrm_activity_target DROP INDEX `UI_activity_target_contact_id` , ADD INDEX `UI_activity_target_contact_id` (`target_contact_id`,`activity_id`); @@ -171,23 +171,23 @@ -- CRM-4478 CRM-4569 INSERT INTO civicrm_option_group (name, {localize field='description'}description{/localize}, is_reserved, is_active) - VALUES + VALUES ('priority', {localize}'Priority'{/localize}, 0, 1), ('redaction_rule', {localize}'Redaction Rule'{/localize}, 0, 1), ('email_greeting', {localize}'Email Greeting Type'{/localize}, 0, 1), ('postal_greeting', {localize}'Postal Greeting Type'{/localize}, 0, 1), ('addressee', {localize}'Addressee Type'{/localize}, 0, 1); - + SELECT @og_id_pr := id FROM civicrm_option_group WHERE name = 'priority'; SELECT @og_id_rr := id FROM civicrm_option_group WHERE name = 'redaction_rule'; SELECT @og_id_rt := id FROM civicrm_option_group WHERE name = 'report_template'; INSERT INTO civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, filter, weight, is_active) - VALUES + VALUES (@og_id_pr, {localize}'Urgent'{/localize}, 1, 'Urgent', 0, 1, 1), (@og_id_pr, {localize}'Normal'{/localize}, 2, 'Normal', 0, 2, 1), (@og_id_pr, {localize}'Low'{/localize}, 3, 'Low', 0, 3, 1), - + (@og_id_rr, {localize}'Vancouver'{/localize}, 'city_', NULL, 0, 1, 1), (@og_id_rr, {localize}'{literal}/(19|20)(\\d{2})-(\\d{1,2})-(\\d{1,2})/{/literal}'{/localize}, 'date_', NULL, 1, 2, 1); @@ -196,7 +196,7 @@ -- Add a new custom html type advanced multi-select -- CRM-4679 -- Add a new custom data type Auto-Complete & html type Contact Reference - ALTER TABLE `civicrm_custom_field` + ALTER TABLE `civicrm_custom_field` MODIFY `data_type` enum ('String', 'Int', 'Float', 'Money', 'Memo', 'Date', 'Boolean', 'StateProvince', 'Country', 'File', 'Link', 'ContactReference')NOT NULL COMMENT 'Controls location of data storage in extended_data table.', MODIFY `html_type` enum ('Text', 'TextArea', 'Select', 'Multi-Select', 'AdvMulti-Select', 'Radio', 'CheckBox', 'Select Date', 'Select State/Province', 'Select Country', 'Multi-Select Country', 'Multi-Select State/Province', 'File', 'Link', 'RichTextEditor', 'Autocomplete-Select')NOT NULL COMMENT 'HTML types plus several built-in extended types.'; @@ -213,210 +213,210 @@ parent_id int unsigned COMMENT 'Parent navigation item, used for grouping', is_active tinyint COMMENT 'Is this navigation item active?', has_separator tinyint COMMENT 'If separator needs to be added after this menu item', - weight int COMMENT 'Ordering of the navigation items in various blocks.' + weight int COMMENT 'Ordering of the navigation items in various blocks.' , PRIMARY KEY ( id ) - , - CONSTRAINT FK_civicrm_navigation_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id) , - CONSTRAINT FK_civicrm_navigation_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_navigation(id) ON DELETE CASCADE + , + CONSTRAINT FK_civicrm_navigation_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id) , + CONSTRAINT FK_civicrm_navigation_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_navigation(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; - + -- Insert default menu to table INSERT INTO civicrm_navigation ( id, domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( 1, @domain_id, NULL, '{ts escape="sql"}Search...{/ts}', 'Search...', NULL, '', NULL, '1', NULL, 1 ), - ( 2, @domain_id, 'civicrm/contact/search&reset=1', '{ts escape="sql"}Find Contacts{/ts}', 'Find Contacts', NULL, '', '1', '1', NULL, 1 ), - ( 3, @domain_id, 'civicrm/contact/search/advanced&reset=1', '{ts escape="sql"}Find Contacts - Advanced Search{/ts}', 'Find Contacts - Advanced Search', NULL, '', '1', '1', NULL, 2 ), - ( 4, @domain_id, 'civicrm/contact/search/custom&csid=15&reset=1', '{ts escape="sql"}Full-text Search{/ts}', 'Full-text Search', NULL, '', '1', '1', NULL, 3 ), - ( 5, @domain_id, 'civicrm/contact/search/builder&reset=1', '{ts escape="sql"}Search Builder{/ts}', 'Search Builder', NULL, '', '1', '1', '1', 4 ), - ( 6, @domain_id, 'civicrm/case/search&reset=1', '{ts escape="sql"}Find Cases{/ts}', 'Find Cases', 'access CiviCase', '', '1', '1', NULL, 5 ), - ( 7, @domain_id, 'civicrm/contribute/search&reset=1', '{ts escape="sql"}Find Contributions{/ts}', 'Find Contributions', 'access CiviContribute', '', '1', '1', NULL, 6 ), - ( 8, @domain_id, 'civicrm/mailing&reset=1', '{ts escape="sql"}Find Mailings{/ts}', 'Find Mailings', 'access CiviMail', '', '1', '1', NULL, 7 ), - ( 9, @domain_id, 'civicrm/member/search&reset=1', '{ts escape="sql"}Find Members{/ts}', 'Find Members', 'access CiviMember', '', '1', '1', NULL, 8 ), - ( 10, @domain_id, 'civicrm/event/search&reset=1', '{ts escape="sql"}Find Participants{/ts}', 'Find Participants', 'access CiviEvent', '', '1', '1', NULL, 9 ), - ( 11, @domain_id, 'civicrm/pledge/search&reset=1', '{ts escape="sql"}Find Pledges{/ts}', 'Find Pledges', 'access CiviPledge', '', '1', '1', 1, 10 ), - - ( 12, @domain_id, 'civicrm/contact/search/custom/list&reset=1', '{ts escape="sql"}Custom Searches...{/ts}', 'Custom Searches...', NULL, '', '1', '1', NULL, 11 ), - ( 13, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=8', '{ts escape="sql"}Activity Search{/ts}', 'Activity Search', NULL, '', '12', '1', NULL, 1 ), - ( 14, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=11', '{ts escape="sql"}Contacts by Date Added{/ts}', 'Contacts by Date Added', NULL, '', '12', '1', NULL, 2 ), - ( 15, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=2', '{ts escape="sql"}Contributors by Aggregate Totals{/ts}', 'Contributors by Aggregate Totals', NULL, '', '12', '1', NULL, 3 ), - ( 16, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=6', '{ts escape="sql"}Proximity Search{/ts}', 'Proximity Search', NULL, '', '12', '1', NULL, 4 ), - - ( 17, @domain_id, NULL, '{ts escape="sql"}Contacts{/ts}', 'Contacts', NULL, '', NULL, '1', NULL, 3 ), - ( 18, @domain_id, 'civicrm/contact/add&reset=1&ct=Individual', '{ts escape="sql"}New Individual{/ts}', 'New Individual', NULL, '', '17', '1', NULL, 1 ), - ( 19, @domain_id, 'civicrm/contact/add&reset=1&ct=Household', '{ts escape="sql"}New Household{/ts}', 'New Household', NULL, '', '17', '1', NULL, 2 ), - ( 20, @domain_id, 'civicrm/contact/add&reset=1&ct=Organization', '{ts escape="sql"}New Organization{/ts}', 'New Organization', NULL, '', '17', '1', 1, 3 ), - ( 21, @domain_id, 'civicrm/activity&reset=1&action=add&context=standalone', '{ts escape="sql"}New Activity{/ts}', 'New Activity', NULL, '', '17', '1', NULL, 4 ), - ( 22, @domain_id, 'civicrm/contact/view/activity&atype=3&action=add&reset=1&context=standalone', '{ts escape="sql"}New Email{/ts}', 'New Email', NULL, '', '17', '1', '1', 5 ), - ( 23, @domain_id, 'civicrm/import/contact&reset=1', '{ts escape="sql"}Import Contacts{/ts}', 'Import Contacts', NULL, '', '17', '1', NULL, 6 ), - ( 24, @domain_id, 'civicrm/import/activity&reset=1', '{ts escape="sql"}Import Activities{/ts}', 'Import Activities', NULL, '', '17', '1', '1', 7 ), - ( 25, @domain_id, 'civicrm/group/add&reset=1', '{ts escape="sql"}New Group{/ts}', 'New Group', NULL, '', '17', '1', NULL, 8 ), - ( 26, @domain_id, 'civicrm/group&reset=1', '{ts escape="sql"}Manage Groups{/ts}', 'Manage Groups', NULL, '', '17', '1', '1', 9 ), - ( 27, @domain_id, 'civicrm/admin/tag&reset=1&action=add', '{ts escape="sql"}New Tag{/ts}', 'New Tag', NULL, '', '17', '1', NULL, 10 ), - ( 28, @domain_id, 'civicrm/admin/tag&reset=1', '{ts escape="sql"}Manage Tags (Categories){/ts}', 'Manage Tags (Categories)', NULL, '', '17', '1', NULL, 11 ), - - ( 29, @domain_id, NULL, '{ts escape="sql"}Contributions{/ts}', 'Contributions', 'access CiviContribute', '', NULL, '1', NULL, 4 ), - ( 30, @domain_id, 'civicrm/contribute&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '29', '1', NULL, 1 ), - ( 31, @domain_id, 'civicrm/contact/view/contribution&reset=1&action=add&context=standalone', '{ts escape="sql"}New Contribution{/ts}', 'New Contribution', NULL, '', '29', '1', NULL, 2 ), - ( 32, @domain_id, 'civicrm/contribute/search&reset=1', '{ts escape="sql"}Find Contributions{/ts}', 'Find Contributions', NULL, '', '29', '1', NULL, 3 ), + ( 1, @domain_id, NULL, '{ts escape="sql"}Search...{/ts}', 'Search...', NULL, '', NULL, '1', NULL, 1 ), + ( 2, @domain_id, 'civicrm/contact/search&reset=1', '{ts escape="sql"}Find Contacts{/ts}', 'Find Contacts', NULL, '', '1', '1', NULL, 1 ), + ( 3, @domain_id, 'civicrm/contact/search/advanced&reset=1', '{ts escape="sql"}Find Contacts - Advanced Search{/ts}', 'Find Contacts - Advanced Search', NULL, '', '1', '1', NULL, 2 ), + ( 4, @domain_id, 'civicrm/contact/search/custom&csid=15&reset=1', '{ts escape="sql"}Full-text Search{/ts}', 'Full-text Search', NULL, '', '1', '1', NULL, 3 ), + ( 5, @domain_id, 'civicrm/contact/search/builder&reset=1', '{ts escape="sql"}Search Builder{/ts}', 'Search Builder', NULL, '', '1', '1', '1', 4 ), + ( 6, @domain_id, 'civicrm/case/search&reset=1', '{ts escape="sql"}Find Cases{/ts}', 'Find Cases', 'access CiviCase', '', '1', '1', NULL, 5 ), + ( 7, @domain_id, 'civicrm/contribute/search&reset=1', '{ts escape="sql"}Find Contributions{/ts}', 'Find Contributions', 'access CiviContribute', '', '1', '1', NULL, 6 ), + ( 8, @domain_id, 'civicrm/mailing&reset=1', '{ts escape="sql"}Find Mailings{/ts}', 'Find Mailings', 'access CiviMail', '', '1', '1', NULL, 7 ), + ( 9, @domain_id, 'civicrm/member/search&reset=1', '{ts escape="sql"}Find Members{/ts}', 'Find Members', 'access CiviMember', '', '1', '1', NULL, 8 ), + ( 10, @domain_id, 'civicrm/event/search&reset=1', '{ts escape="sql"}Find Participants{/ts}', 'Find Participants', 'access CiviEvent', '', '1', '1', NULL, 9 ), + ( 11, @domain_id, 'civicrm/pledge/search&reset=1', '{ts escape="sql"}Find Pledges{/ts}', 'Find Pledges', 'access CiviPledge', '', '1', '1', 1, 10 ), + + ( 12, @domain_id, 'civicrm/contact/search/custom/list&reset=1', '{ts escape="sql"}Custom Searches...{/ts}', 'Custom Searches...', NULL, '', '1', '1', NULL, 11 ), + ( 13, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=8', '{ts escape="sql"}Activity Search{/ts}', 'Activity Search', NULL, '', '12', '1', NULL, 1 ), + ( 14, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=11', '{ts escape="sql"}Contacts by Date Added{/ts}', 'Contacts by Date Added', NULL, '', '12', '1', NULL, 2 ), + ( 15, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=2', '{ts escape="sql"}Contributors by Aggregate Totals{/ts}', 'Contributors by Aggregate Totals', NULL, '', '12', '1', NULL, 3 ), + ( 16, @domain_id, 'civicrm/contact/search/custom&reset=1&csid=6', '{ts escape="sql"}Proximity Search{/ts}', 'Proximity Search', NULL, '', '12', '1', NULL, 4 ), + + ( 17, @domain_id, NULL, '{ts escape="sql"}Contacts{/ts}', 'Contacts', NULL, '', NULL, '1', NULL, 3 ), + ( 18, @domain_id, 'civicrm/contact/add&reset=1&ct=Individual', '{ts escape="sql"}New Individual{/ts}', 'New Individual', NULL, '', '17', '1', NULL, 1 ), + ( 19, @domain_id, 'civicrm/contact/add&reset=1&ct=Household', '{ts escape="sql"}New Household{/ts}', 'New Household', NULL, '', '17', '1', NULL, 2 ), + ( 20, @domain_id, 'civicrm/contact/add&reset=1&ct=Organization', '{ts escape="sql"}New Organization{/ts}', 'New Organization', NULL, '', '17', '1', 1, 3 ), + ( 21, @domain_id, 'civicrm/activity&reset=1&action=add&context=standalone', '{ts escape="sql"}New Activity{/ts}', 'New Activity', NULL, '', '17', '1', NULL, 4 ), + ( 22, @domain_id, 'civicrm/contact/view/activity&atype=3&action=add&reset=1&context=standalone', '{ts escape="sql"}New Email{/ts}', 'New Email', NULL, '', '17', '1', '1', 5 ), + ( 23, @domain_id, 'civicrm/import/contact&reset=1', '{ts escape="sql"}Import Contacts{/ts}', 'Import Contacts', NULL, '', '17', '1', NULL, 6 ), + ( 24, @domain_id, 'civicrm/import/activity&reset=1', '{ts escape="sql"}Import Activities{/ts}', 'Import Activities', NULL, '', '17', '1', '1', 7 ), + ( 25, @domain_id, 'civicrm/group/add&reset=1', '{ts escape="sql"}New Group{/ts}', 'New Group', NULL, '', '17', '1', NULL, 8 ), + ( 26, @domain_id, 'civicrm/group&reset=1', '{ts escape="sql"}Manage Groups{/ts}', 'Manage Groups', NULL, '', '17', '1', '1', 9 ), + ( 27, @domain_id, 'civicrm/admin/tag&reset=1&action=add', '{ts escape="sql"}New Tag{/ts}', 'New Tag', NULL, '', '17', '1', NULL, 10 ), + ( 28, @domain_id, 'civicrm/admin/tag&reset=1', '{ts escape="sql"}Manage Tags (Categories){/ts}', 'Manage Tags (Categories)', NULL, '', '17', '1', NULL, 11 ), + + ( 29, @domain_id, NULL, '{ts escape="sql"}Contributions{/ts}', 'Contributions', 'access CiviContribute', '', NULL, '1', NULL, 4 ), + ( 30, @domain_id, 'civicrm/contribute&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '29', '1', NULL, 1 ), + ( 31, @domain_id, 'civicrm/contact/view/contribution&reset=1&action=add&context=standalone', '{ts escape="sql"}New Contribution{/ts}', 'New Contribution', NULL, '', '29', '1', NULL, 2 ), + ( 32, @domain_id, 'civicrm/contribute/search&reset=1', '{ts escape="sql"}Find Contributions{/ts}', 'Find Contributions', NULL, '', '29', '1', NULL, 3 ), ( 33, @domain_id, 'civicrm/contribute/import&reset=1', '{ts escape="sql"}Import Contributions{/ts}', 'Import Contributions', NULL, '', '29', '1', '1', 4 ), - - ( 34, @domain_id, NULL, '{ts escape="sql"}Pledges{/ts}', 'Pledges', 'access CiviPledge', '', 29, '1', 1, 5 ), - ( 35, @domain_id, 'civicrm/pledge&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '34', '1', NULL, 1 ), - ( 36, @domain_id, 'civicrm/pledge/search&reset=1', '{ts escape="sql"}Find Pledges{/ts}', 'Find Pledges', NULL, '', '34', '1', NULL, 2 ), - ( 37, @domain_id, 'civicrm/admin/contribute&reset=1&action=add', '{ts escape="sql"}New Contribution Page{/ts}', 'New Contribution Page', NULL, '', '29', '1', NULL, 6 ), - ( 38, @domain_id, 'civicrm/admin/contribute&reset=1', '{ts escape="sql"}Manage Contribution Pages{/ts}', 'Manage Contribution Pages', NULL, '', '29', '1', '1', 7 ), - ( 39, @domain_id, 'civicrm/admin/pcp&reset=1', '{ts escape="sql"}Personal Campaign Pages{/ts}', 'Personal Campaign Pages', NULL, '', '29', '1', NULL, 8 ), - ( 40, @domain_id, 'civicrm/admin/contribute/managePremiums&reset=1', '{ts escape="sql"}Premiums (Thank-you Gifts){/ts}', 'Premiums', NULL, '', '29', '1', NULL, 9 ), - - ( 41, @domain_id, NULL, '{ts escape="sql"}Events{/ts}', 'Events', 'access CiviEvent', '', NULL, '1', NULL, 5 ), - ( 42, @domain_id, 'civicrm/event&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'CiviEvent Dashboard', NULL, '', '41', '1', NULL, 1 ), - ( 43, @domain_id, 'civicrm/contact/view/participant&reset=1&action=add&context=standalone', '{ts escape="sql"}Register Event Participant{/ts}', 'Register Event Participant', NULL, '', '41', '1', NULL, 2 ), - ( 44, @domain_id, 'civicrm/event/search&reset=1', '{ts escape="sql"}Find Participants{/ts}', 'Find Participants', NULL, '', '41', '1', NULL, 3 ), - ( 45, @domain_id, 'civicrm/event/import&reset=1', '{ts escape="sql"}Import Participants{/ts}', 'Import Participants', NULL, '', '41', '1', '1', 4 ), - ( 46, @domain_id, 'civicrm/event/add&reset=1&action=add', '{ts escape="sql"}New Event{/ts}', 'New Event', NULL, '', '41', '1', NULL, 5 ), - ( 47, @domain_id, 'civicrm/event/manage&reset=1', '{ts escape="sql"}Manage Events{/ts}', 'Manage Events', NULL, '', '41', '1', 1, 6 ), - ( 48, @domain_id, 'civicrm/admin/eventTemplate&reset=1', '{ts escape="sql"}Event Templates{/ts}', 'Event Templates', 'access CiviEvent,administer CiviCRM', '', '41', '1', 1, 7 ), - ( 49, @domain_id, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql"}New Price Set{/ts}', 'New Price Set', NULL, '', '41', '1', NULL, 8 ), + + ( 34, @domain_id, NULL, '{ts escape="sql"}Pledges{/ts}', 'Pledges', 'access CiviPledge', '', 29, '1', 1, 5 ), + ( 35, @domain_id, 'civicrm/pledge&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '34', '1', NULL, 1 ), + ( 36, @domain_id, 'civicrm/pledge/search&reset=1', '{ts escape="sql"}Find Pledges{/ts}', 'Find Pledges', NULL, '', '34', '1', NULL, 2 ), + ( 37, @domain_id, 'civicrm/admin/contribute&reset=1&action=add', '{ts escape="sql"}New Contribution Page{/ts}', 'New Contribution Page', NULL, '', '29', '1', NULL, 6 ), + ( 38, @domain_id, 'civicrm/admin/contribute&reset=1', '{ts escape="sql"}Manage Contribution Pages{/ts}', 'Manage Contribution Pages', NULL, '', '29', '1', '1', 7 ), + ( 39, @domain_id, 'civicrm/admin/pcp&reset=1', '{ts escape="sql"}Personal Campaign Pages{/ts}', 'Personal Campaign Pages', NULL, '', '29', '1', NULL, 8 ), + ( 40, @domain_id, 'civicrm/admin/contribute/managePremiums&reset=1', '{ts escape="sql"}Premiums (Thank-you Gifts){/ts}', 'Premiums', NULL, '', '29', '1', NULL, 9 ), + + ( 41, @domain_id, NULL, '{ts escape="sql"}Events{/ts}', 'Events', 'access CiviEvent', '', NULL, '1', NULL, 5 ), + ( 42, @domain_id, 'civicrm/event&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'CiviEvent Dashboard', NULL, '', '41', '1', NULL, 1 ), + ( 43, @domain_id, 'civicrm/contact/view/participant&reset=1&action=add&context=standalone', '{ts escape="sql"}Register Event Participant{/ts}', 'Register Event Participant', NULL, '', '41', '1', NULL, 2 ), + ( 44, @domain_id, 'civicrm/event/search&reset=1', '{ts escape="sql"}Find Participants{/ts}', 'Find Participants', NULL, '', '41', '1', NULL, 3 ), + ( 45, @domain_id, 'civicrm/event/import&reset=1', '{ts escape="sql"}Import Participants{/ts}', 'Import Participants', NULL, '', '41', '1', '1', 4 ), + ( 46, @domain_id, 'civicrm/event/add&reset=1&action=add', '{ts escape="sql"}New Event{/ts}', 'New Event', NULL, '', '41', '1', NULL, 5 ), + ( 47, @domain_id, 'civicrm/event/manage&reset=1', '{ts escape="sql"}Manage Events{/ts}', 'Manage Events', NULL, '', '41', '1', 1, 6 ), + ( 48, @domain_id, 'civicrm/admin/eventTemplate&reset=1', '{ts escape="sql"}Event Templates{/ts}', 'Event Templates', 'access CiviEvent,administer CiviCRM', '', '41', '1', 1, 7 ), + ( 49, @domain_id, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql"}New Price Set{/ts}', 'New Price Set', NULL, '', '41', '1', NULL, 8 ), ( 50, @domain_id, 'civicrm/event/price&reset=1', '{ts escape="sql"}Manage Price Sets{/ts}', 'Manage Price Sets', NULL, '', '41', '1', NULL, 9 ), - - ( 51, @domain_id, NULL, '{ts escape="sql"}Mailings{/ts}', 'Mailings', 'access CiviMail', '', NULL, '1', NULL, 6 ), - ( 52, @domain_id, 'civicrm/mailing/send&reset=1', '{ts escape="sql"}New Mailing{/ts}', 'New Mailing', NULL, '', '51', '1', NULL, 1 ), - ( 53, @domain_id, 'civicrm/mailing/browse/unscheduled&reset=1&scheduled=false', '{ts escape="sql"}Draft and Unscheduled Mailings{/ts}', 'Draft and Unscheduled Mailings', NULL, '', '51', '1', NULL, 2 ), - ( 54, @domain_id, 'civicrm/mailing/browse/scheduled&reset=1&scheduled=true', '{ts escape="sql"}Scheduled and Sent Mailings{/ts}', 'Scheduled and Sent Mailings', NULL, '', '51', '1', NULL, 3 ), - ( 55, @domain_id, 'civicrm/mailing/browse/archived&reset=1', '{ts escape="sql"}Archived Mailings{/ts}', 'Archived Mailings', NULL, '', '51', '1', 1, 4 ), - ( 56, @domain_id, 'civicrm/admin/component&reset=1', '{ts escape="sql"}Headers, Footers, and Automated Messages{/ts}', 'Headers, Footers, and Automated Messages', NULL, '', '51', '1', NULL, 5 ), - ( 57, @domain_id, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql"}Message Templates{/ts}', 'Message Templates', NULL, '', '51', '1', NULL, 6 ), - ( 58, @domain_id, 'civicrm/admin/options/from_email&group=from_email_address&reset=1', '{ts escape="sql"}From Email Addresses{/ts}', 'From Email Addresses', NULL, '', '51', '1', NULL, 7 ), - - ( 59, @domain_id, NULL, '{ts escape="sql"}Memberships{/ts}', 'Memberships', 'access CiviMember', '', NULL, '1', NULL, 7 ), - ( 60, @domain_id, 'civicrm/member&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '59', '1', NULL, 1 ), - ( 61, @domain_id, 'civicrm/contact/view/membership&reset=1&action=add&context=standalone', '{ts escape="sql"}New Membership{/ts}', 'New Membership', NULL, '', '59', '1', NULL, 2 ), - ( 62, @domain_id, 'civicrm/member/search&reset=1', '{ts escape="sql"}Find Members{/ts}', 'Find Members', NULL, '', '59', '1', NULL, 3 ), - ( 63, @domain_id, 'civicrm/member/import&reset=1', '{ts escape="sql"}Import Members{/ts}', 'Import Members', NULL, '', '59', '1', NULL, 4 ), - - ( 64, @domain_id, NULL, '{ts escape="sql"}Other{/ts}', 'Other', 'access CiviGrant,access CiviCase', 'OR', NULL, '1', NULL, 8 ), - ( 65, @domain_id, NULL, '{ts escape="sql"}Cases{/ts}', 'Cases', 'access CiviCase', '', '64', '1', NULL, 1 ), - ( 66, @domain_id, 'civicrm/case&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '65', '1', NULL, 1 ), - ( 67, @domain_id, 'civicrm/contact/view/case&reset=1&action=add&atype=13&context=standalone', '{ts escape="sql"}New Case{/ts}', 'New Case', NULL, '', '65', '1', NULL, 2 ), - ( 68, @domain_id, 'civicrm/case/search&reset=1', '{ts escape="sql"}Find Cases{/ts}', 'Find Cases', NULL, '', '65', '1', 1, 3 ), - + + ( 51, @domain_id, NULL, '{ts escape="sql"}Mailings{/ts}', 'Mailings', 'access CiviMail', '', NULL, '1', NULL, 6 ), + ( 52, @domain_id, 'civicrm/mailing/send&reset=1', '{ts escape="sql"}New Mailing{/ts}', 'New Mailing', NULL, '', '51', '1', NULL, 1 ), + ( 53, @domain_id, 'civicrm/mailing/browse/unscheduled&reset=1&scheduled=false', '{ts escape="sql"}Draft and Unscheduled Mailings{/ts}', 'Draft and Unscheduled Mailings', NULL, '', '51', '1', NULL, 2 ), + ( 54, @domain_id, 'civicrm/mailing/browse/scheduled&reset=1&scheduled=true', '{ts escape="sql"}Scheduled and Sent Mailings{/ts}', 'Scheduled and Sent Mailings', NULL, '', '51', '1', NULL, 3 ), + ( 55, @domain_id, 'civicrm/mailing/browse/archived&reset=1', '{ts escape="sql"}Archived Mailings{/ts}', 'Archived Mailings', NULL, '', '51', '1', 1, 4 ), + ( 56, @domain_id, 'civicrm/admin/component&reset=1', '{ts escape="sql"}Headers, Footers, and Automated Messages{/ts}', 'Headers, Footers, and Automated Messages', NULL, '', '51', '1', NULL, 5 ), + ( 57, @domain_id, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql"}Message Templates{/ts}', 'Message Templates', NULL, '', '51', '1', NULL, 6 ), + ( 58, @domain_id, 'civicrm/admin/options/from_email&group=from_email_address&reset=1', '{ts escape="sql"}From Email Addresses{/ts}', 'From Email Addresses', NULL, '', '51', '1', NULL, 7 ), + + ( 59, @domain_id, NULL, '{ts escape="sql"}Memberships{/ts}', 'Memberships', 'access CiviMember', '', NULL, '1', NULL, 7 ), + ( 60, @domain_id, 'civicrm/member&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '59', '1', NULL, 1 ), + ( 61, @domain_id, 'civicrm/contact/view/membership&reset=1&action=add&context=standalone', '{ts escape="sql"}New Membership{/ts}', 'New Membership', NULL, '', '59', '1', NULL, 2 ), + ( 62, @domain_id, 'civicrm/member/search&reset=1', '{ts escape="sql"}Find Members{/ts}', 'Find Members', NULL, '', '59', '1', NULL, 3 ), + ( 63, @domain_id, 'civicrm/member/import&reset=1', '{ts escape="sql"}Import Members{/ts}', 'Import Members', NULL, '', '59', '1', NULL, 4 ), + + ( 64, @domain_id, NULL, '{ts escape="sql"}Other{/ts}', 'Other', 'access CiviGrant,access CiviCase', 'OR', NULL, '1', NULL, 8 ), + ( 65, @domain_id, NULL, '{ts escape="sql"}Cases{/ts}', 'Cases', 'access CiviCase', '', '64', '1', NULL, 1 ), + ( 66, @domain_id, 'civicrm/case&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '65', '1', NULL, 1 ), + ( 67, @domain_id, 'civicrm/contact/view/case&reset=1&action=add&atype=13&context=standalone', '{ts escape="sql"}New Case{/ts}', 'New Case', NULL, '', '65', '1', NULL, 2 ), + ( 68, @domain_id, 'civicrm/case/search&reset=1', '{ts escape="sql"}Find Cases{/ts}', 'Find Cases', NULL, '', '65', '1', 1, 3 ), + ( 69, @domain_id, NULL, '{ts escape="sql"}Grants{/ts}', 'Grants', 'access CiviGrant', '', '64', '1', NULL, 2 ), - ( 70, @domain_id, 'civicrm/grant&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '69', '1', NULL, 1 ), - ( 71, @domain_id, 'civicrm/contact/view/grant&reset=1&action=add&context=standalone', '{ts escape="sql"}New Grant{/ts}', 'New Grant', NULL, '', '69', '1', NULL, 2 ), - ( 72, @domain_id, 'civicrm/grant/search&reset=1', '{ts escape="sql"}Find Grants{/ts}', 'Find Grants', NULL, '', '69', '1', 1, 3 ), - - ( 73, @domain_id, NULL, '{ts escape="sql"}Administer{/ts}', 'Administer', 'administer CiviCRM', '', NULL, '1', NULL, 9 ), - ( 74, @domain_id, 'civicrm/admin&reset=1', '{ts escape="sql"}Administration Console{/ts}', 'Administration Console', NULL, '', '73', '1', NULL, 1 ), - - ( 75, @domain_id, NULL, '{ts escape="sql"}Customize{/ts}', 'Customize', NULL, '', '73', '1', NULL, 2 ), - ( 76, @domain_id, 'civicrm/admin/custom/group&reset=1', '{ts escape="sql"}Custom Data{/ts}', 'Custom Data', NULL, '', '75', '1', NULL, 1 ), - ( 77, @domain_id, 'civicrm/admin/uf/group&reset=1', '{ts escape="sql"}CiviCRM Profile{/ts}', 'CiviCRM Profile', NULL, '', '75', '1', NULL, 2 ), - ( 78, @domain_id, 'civicrm/admin/menu&reset=1', '{ts escape="sql"}Navigation Menu{/ts}', 'Navigation Menu', NULL, '', '75', '1', NULL, 3 ), - ( 79, @domain_id, 'civicrm/admin/options/custom_search&reset=1&group=custom_search', '{ts escape="sql"}Manage Custom Searches{/ts}', 'Manage Custom Searches', NULL, '', '75', '1', NULL, 4 ), - - ( 80, @domain_id, NULL, '{ts escape="sql"}Configure{/ts}', 'Configure', NULL, '', '73', '1', NULL, 3 ), - ( 81, @domain_id, 'civicrm/admin/configtask&reset=1', '{ts escape="sql"}Configuration Checklist{/ts}', 'Configuration Checklist', NULL, '', '80', '1', NULL, 1 ), - - ( 82, @domain_id, 'civicrm/admin/setting&reset=1', '{ts escape="sql"}Global Settings{/ts}', 'Global Settings', NULL, '', '80', '1', NULL, 2 ), - ( 83, @domain_id, 'civicrm/admin/setting/component&reset=1', '{ts escape="sql"}Enable CiviCRM Components{/ts}', 'Enable Components', NULL, '', '82', '1', NULL, 1 ), - ( 84, @domain_id, 'civicrm/admin/setting/preferences/display&reset=1', '{ts escape="sql"}Site Preferences (screen and form configuration){/ts}', 'Site Preferences', NULL, '', '82', '1', NULL, 2 ), - ( 85, @domain_id, 'civicrm/admin/setting/path&reset=1', '{ts escape="sql"}Directories{/ts}', 'Directories', NULL, '', '82', '1', NULL, 3 ), - ( 86, @domain_id, 'civicrm/admin/setting/url&reset=1', '{ts escape="sql"}Resource URLs{/ts}', 'Resource URLs', NULL, '', '82', '1', NULL, 4 ), - ( 87, @domain_id, 'civicrm/admin/setting/smtp&reset=1', '{ts escape="sql"}Outbound Email (SMTP/Sendmail){/ts}', 'Outbound Email', NULL, '', '82', '1', NULL, 5 ), - ( 88, @domain_id, 'civicrm/admin/setting/mapping&reset=1', '{ts escape="sql"}Mapping and Geocoding{/ts}', 'Mapping and Geocoding', NULL, '', '82', '1', NULL, 6 ), - ( 89, @domain_id, 'civicrm/admin/paymentProcessor&reset=1', '{ts escape="sql"}Payment Processors{/ts}', 'Payment Processors', NULL, '', '82', '1', NULL, 7 ), - ( 90, @domain_id, 'civicrm/admin/setting/localization&reset=1', '{ts escape="sql"}Localization{/ts}', 'Localization', NULL, '', '82', '1', NULL, 8 ), - ( 91, @domain_id, 'civicrm/admin/setting/preferences/address&reset=1', '{ts escape="sql"}Address Settings{/ts}', 'Address Settings', NULL, '', '82', '1', NULL, 9 ), - ( 92, @domain_id, 'civicrm/admin/setting/date&reset=1', '{ts escape="sql"}Date Formats{/ts}', 'Date Formats', NULL, '', '82', '1', NULL, 10 ), - ( 93, @domain_id, 'civicrm/admin/setting/uf&reset=1', '{ts escape="sql"}CMS Integration{/ts}', 'CMS Integration', NULL, '', '82', '1', NULL, 11 ), - ( 94, @domain_id, 'civicrm/admin/setting/misc&reset=1', '{ts escape="sql"}Miscellaneous (version check, search, reCAPTCHA...){/ts}', 'Miscellaneous', NULL, '', '82', '1', NULL, 12 ), - ( 95, @domain_id, 'civicrm/admin/options/safe_file_extension&group=safe_file_extension&reset=1', '{ts escape="sql"}Safe File Extensions{/ts}', 'Safe File Extensions', NULL, '', '82', '1', NULL, 13 ), - ( 96, @domain_id, 'civicrm/admin/setting/debug&reset=1', '{ts escape="sql"}Debugging{/ts}', 'Debugging', NULL, '', '82', '1', NULL, 14 ), - - ( 97, @domain_id, 'civicrm/admin/mapping&reset=1', '{ts escape="sql"}Import/Export Mappings{/ts}', 'Import/Export Mappings', NULL, '', '80', '1', NULL, 3 ), - ( 98, @domain_id, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql"}Message Templates{/ts}', 'Message Templates', NULL, '', '80', '1', NULL, 4 ), - ( 99, @domain_id, 'civicrm/admin/domain&action=update&reset=1', '{ts escape="sql"}Domain Information{/ts}', 'Domain Information', NULL, '', '80', '1', NULL, 5 ), - ( 100,@domain_id, 'civicrm/admin/options/from_email_address&group=from_email_address&reset=1', '{ts escape="sql"}FROM Email Addresses{/ts}', 'FROM Email Addresses', NULL, '', '80', '1', NULL, 6 ), - ( 101,@domain_id, 'civicrm/admin/setting/updateConfigBackend&reset=1', '{ts escape="sql"}Update Directory Path and URL{/ts}', 'Update Directory Path and URL', NULL, '', '80', '1', NULL, 7 ), - - ( 102, @domain_id, NULL, '{ts escape="sql"}Manage{/ts}', 'Manage', NULL, '', '73', '1', NULL, 4 ), - ( 103, @domain_id, 'civicrm/admin/deduperules&reset=1', '{ts escape="sql"}Find and Merge Duplicate Contacts{/ts}', 'Find and Merge Duplicate Contacts', '', '', '102', '1', NULL, 1 ), - ( 104, @domain_id, 'civicrm/admin/access&reset=1', '{ts escape="sql"}Access Control{/ts}', 'Access Control', NULL, '', '102', '1', NULL, 2 ), - ( 105, @domain_id, 'civicrm/admin/synchUser&reset=1', '{ts escape="sql"}Synchronize Users to Contacts{/ts}', 'Synchronize Users to Contacts', NULL, '', '102', '1', NULL, 3 ), - - ( 106, @domain_id, NULL, '{ts escape="sql"}Option Lists{/ts}', 'Option Lists', NULL, '', '73', '1', NULL, 5 ), - ( 107, @domain_id, 'civicrm/admin/options/activity_type&reset=1&group=activity_type', '{ts escape="sql"}Activity Types{/ts}', 'Activity Types', NULL, '', '106', '1', NULL, 1 ), - ( 108, @domain_id, 'civicrm/admin/reltype&reset=1', '{ts escape="sql"}Relationship Types{/ts}', 'Relationship Types', NULL, '', '106', '1', NULL, 2 ), - ( 109, @domain_id, 'civicrm/admin/tag&reset=1', '{ts escape="sql"}Tags (Categories){/ts}', 'Tags (Categories)', NULL, '', '106', '1', 1, 3 ), - ( 110, @domain_id, 'civicrm/admin/options/gender&reset=1&group=gender', '{ts escape="sql"}Gender Options{/ts}', 'Gender Options', NULL, '', '106', '1', NULL, 4 ), - ( 111, @domain_id, 'civicrm/admin/options/individual_prefix&group=individual_prefix&reset=1', '{ts escape="sql"}Individual Prefixes (Ms, Mr...){/ts}', 'Individual Prefixes (Ms, Mr...)', NULL, '', '106', '1', NULL, 5 ), - ( 112, @domain_id, 'civicrm/admin/options/individual_suffix&group=individual_suffix&reset=1', '{ts escape="sql"}Individual Suffixes (Jr, Sr...){/ts}', 'Individual Suffixes (Jr, Sr...)', NULL, '', '106', '1', 1, 6 ), - ( 113, @domain_id, 'civicrm/admin/options/addressee&group=addressee&reset=1', '{ts escape="sql"}Addressee Formats{/ts}', 'Addressee Formats', NULL, '', '106', '1', NULL, 7 ), - ( 114, @domain_id, 'civicrm/admin/options/email_greeting&group=email_greeting&reset=1', '{ts escape="sql"}Email Greetings{/ts}', 'Email Greetings', NULL, '', '106', '1', NULL, 8 ), - ( 115, @domain_id, 'civicrm/admin/options/postal_greeting&group=postal_greeting&reset=1', '{ts escape="sql"}Postal Greetings{/ts}', 'Postal Greetings', NULL, '', '106', '1', 1, 9 ), - ( 116, @domain_id, 'civicrm/admin/options/instant_messenger_service&group=instant_messenger_service&reset=1', '{ts escape="sql"}Instant Messenger Services{/ts}', 'Instant Messenger Services', NULL, '', '106', '1', NULL, 10 ), - ( 117, @domain_id, 'civicrm/admin/locationType&reset=1', '{ts escape="sql"}Location Types (Home, Work...){/ts}', 'Location Types (Home, Work...)', NULL, '', '106', '1', NULL, 11 ), - ( 118, @domain_id, 'civicrm/admin/options/mobile_provider&group=mobile_provider&reset=1', '{ts escape="sql"}Mobile Phone Providers{/ts}', 'Mobile Phone Providers', NULL, '', '106', '1', NULL, 12 ), - ( 119, @domain_id, 'civicrm/admin/options/phone_type&group=phone_type&reset=1', '{ts escape="sql"}Phone Types{/ts}', 'Phone Types', NULL, '', '106', '1', NULL, 13 ), - ( 120, @domain_id, 'civicrm/admin/options/preferred_communication_method&group=preferred_communication_method&reset=1', '{ts escape="sql"}Preferred Communication Methods{/ts}', 'Preferred Communication Methods', NULL, '', '106', '1', NULL, 14 ), - - ( 121, @domain_id, NULL, '{ts escape="sql"}CiviCase{/ts}', 'CiviCase', 'access CiviCase,administer CiviCRM', 'AND', '73', '1', NULL, 6 ), - ( 122, @domain_id, 'civicrm/admin/options/case_type&group=case_type&reset=1', '{ts escape="sql"}Case Types{/ts}', 'Case Types', 'access CiviCase,administer CiviCRM', '', '121', '1', NULL, 1 ), - ( 123, @domain_id, 'civicrm/admin/options/redaction_rule&group=redaction_rule&reset=1', '{ts escape="sql"}Redaction Rules{/ts}', 'Redaction Rules', 'access CiviCase,administer CiviCRM', '', '121', '1', NULL, 2 ), - - ( 124, @domain_id, NULL, '{ts escape="sql"}CiviContribute{/ts}', 'CiviContribute', 'access CiviContribute,administer CiviCRM', 'AND', '73', '1', NULL, 7 ), - ( 125, @domain_id, 'civicrm/admin/contribute&reset=1&action=add', '{ts escape="sql"}New Contribution Page{/ts}', 'New Contribution Page', NULL, '', '124', '1', NULL, 6 ), - ( 126, @domain_id, 'civicrm/admin/contribute&reset=1', '{ts escape="sql"}Manage Contribution Pages{/ts}', 'Manage Contribution Pages', NULL, '', '124', '1', '1', 7 ), - ( 127, @domain_id, 'civicrm/admin/pcp&reset=1', '{ts escape="sql"}Personal Campaign Pages{/ts}', 'Personal Campaign Pages', NULL, '', '124', '1', NULL, 8 ), - ( 128, @domain_id, 'civicrm/admin/contribute/managePremiums&reset=1', '{ts escape="sql"}Premiums (Thank-you Gifts){/ts}', 'Premiums', NULL, '', '124', '1', 1, 9 ), - ( 129, @domain_id, 'civicrm/admin/contribute/contributionType&reset=1', '{ts escape="sql"}Contribution Types{/ts}', 'Contribution Types', NULL, '', '124', '1', NULL, 10 ), - ( 130, @domain_id, 'civicrm/admin/options/payment_instrument&group=payment_instrument&reset=1', '{ts escape="sql"}Payment Instruments{/ts}', 'Payment Instruments', NULL, '', '124', '1', NULL, 11 ), - ( 131, @domain_id, 'civicrm/admin/options/accept_creditcard&group=accept_creditcard&reset=1', '{ts escape="sql"}Accepted Credit Cards{/ts}', 'Accepted Credit Cards', NULL, '', '124', '1', NULL, 12 ), - - ( 132, @domain_id, NULL, '{ts escape="sql"}CiviEvent{/ts}', 'CiviEvent', 'access CiviEvent,administer CiviCRM', 'AND', '73', '1', NULL, 8 ), - ( 133, @domain_id, 'civicrm/event/add&reset=1&action=add', '{ts escape="sql"}New Event{/ts}', 'New Event', NULL, '', '132', '1', NULL, 1 ), - ( 134, @domain_id, 'civicrm/event/manage&reset=1', '{ts escape="sql"}Manage Events{/ts}', 'Manage Events', NULL, '', '132', '1', 1, 2 ), - ( 135, @domain_id, 'civicrm/admin/eventTemplate&reset=1', '{ts escape="sql"}Event Templates{/ts}', 'Event Templates', 'access CiviEvent,administer CiviCRM', '', '132', '1', 1, 3 ), - ( 136, @domain_id, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql"}New Price Set{/ts}', 'New Price Set', NULL, '', '132', '1', NULL, 4 ), + ( 70, @domain_id, 'civicrm/grant&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', NULL, '', '69', '1', NULL, 1 ), + ( 71, @domain_id, 'civicrm/contact/view/grant&reset=1&action=add&context=standalone', '{ts escape="sql"}New Grant{/ts}', 'New Grant', NULL, '', '69', '1', NULL, 2 ), + ( 72, @domain_id, 'civicrm/grant/search&reset=1', '{ts escape="sql"}Find Grants{/ts}', 'Find Grants', NULL, '', '69', '1', 1, 3 ), + + ( 73, @domain_id, NULL, '{ts escape="sql"}Administer{/ts}', 'Administer', 'administer CiviCRM', '', NULL, '1', NULL, 9 ), + ( 74, @domain_id, 'civicrm/admin&reset=1', '{ts escape="sql"}Administration Console{/ts}', 'Administration Console', NULL, '', '73', '1', NULL, 1 ), + + ( 75, @domain_id, NULL, '{ts escape="sql"}Customize{/ts}', 'Customize', NULL, '', '73', '1', NULL, 2 ), + ( 76, @domain_id, 'civicrm/admin/custom/group&reset=1', '{ts escape="sql"}Custom Data{/ts}', 'Custom Data', NULL, '', '75', '1', NULL, 1 ), + ( 77, @domain_id, 'civicrm/admin/uf/group&reset=1', '{ts escape="sql"}CiviCRM Profile{/ts}', 'CiviCRM Profile', NULL, '', '75', '1', NULL, 2 ), + ( 78, @domain_id, 'civicrm/admin/menu&reset=1', '{ts escape="sql"}Navigation Menu{/ts}', 'Navigation Menu', NULL, '', '75', '1', NULL, 3 ), + ( 79, @domain_id, 'civicrm/admin/options/custom_search&reset=1&group=custom_search', '{ts escape="sql"}Manage Custom Searches{/ts}', 'Manage Custom Searches', NULL, '', '75', '1', NULL, 4 ), + + ( 80, @domain_id, NULL, '{ts escape="sql"}Configure{/ts}', 'Configure', NULL, '', '73', '1', NULL, 3 ), + ( 81, @domain_id, 'civicrm/admin/configtask&reset=1', '{ts escape="sql"}Configuration Checklist{/ts}', 'Configuration Checklist', NULL, '', '80', '1', NULL, 1 ), + + ( 82, @domain_id, 'civicrm/admin/setting&reset=1', '{ts escape="sql"}Global Settings{/ts}', 'Global Settings', NULL, '', '80', '1', NULL, 2 ), + ( 83, @domain_id, 'civicrm/admin/setting/component&reset=1', '{ts escape="sql"}Enable CiviCRM Components{/ts}', 'Enable Components', NULL, '', '82', '1', NULL, 1 ), + ( 84, @domain_id, 'civicrm/admin/setting/preferences/display&reset=1', '{ts escape="sql"}Site Preferences (screen and form configuration){/ts}', 'Site Preferences', NULL, '', '82', '1', NULL, 2 ), + ( 85, @domain_id, 'civicrm/admin/setting/path&reset=1', '{ts escape="sql"}Directories{/ts}', 'Directories', NULL, '', '82', '1', NULL, 3 ), + ( 86, @domain_id, 'civicrm/admin/setting/url&reset=1', '{ts escape="sql"}Resource URLs{/ts}', 'Resource URLs', NULL, '', '82', '1', NULL, 4 ), + ( 87, @domain_id, 'civicrm/admin/setting/smtp&reset=1', '{ts escape="sql"}Outbound Email (SMTP/Sendmail){/ts}', 'Outbound Email', NULL, '', '82', '1', NULL, 5 ), + ( 88, @domain_id, 'civicrm/admin/setting/mapping&reset=1', '{ts escape="sql"}Mapping and Geocoding{/ts}', 'Mapping and Geocoding', NULL, '', '82', '1', NULL, 6 ), + ( 89, @domain_id, 'civicrm/admin/paymentProcessor&reset=1', '{ts escape="sql"}Payment Processors{/ts}', 'Payment Processors', NULL, '', '82', '1', NULL, 7 ), + ( 90, @domain_id, 'civicrm/admin/setting/localization&reset=1', '{ts escape="sql"}Localization{/ts}', 'Localization', NULL, '', '82', '1', NULL, 8 ), + ( 91, @domain_id, 'civicrm/admin/setting/preferences/address&reset=1', '{ts escape="sql"}Address Settings{/ts}', 'Address Settings', NULL, '', '82', '1', NULL, 9 ), + ( 92, @domain_id, 'civicrm/admin/setting/date&reset=1', '{ts escape="sql"}Date Formats{/ts}', 'Date Formats', NULL, '', '82', '1', NULL, 10 ), + ( 93, @domain_id, 'civicrm/admin/setting/uf&reset=1', '{ts escape="sql"}CMS Integration{/ts}', 'CMS Integration', NULL, '', '82', '1', NULL, 11 ), + ( 94, @domain_id, 'civicrm/admin/setting/misc&reset=1', '{ts escape="sql"}Miscellaneous (version check, search, reCAPTCHA...){/ts}', 'Miscellaneous', NULL, '', '82', '1', NULL, 12 ), + ( 95, @domain_id, 'civicrm/admin/options/safe_file_extension&group=safe_file_extension&reset=1', '{ts escape="sql"}Safe File Extensions{/ts}', 'Safe File Extensions', NULL, '', '82', '1', NULL, 13 ), + ( 96, @domain_id, 'civicrm/admin/setting/debug&reset=1', '{ts escape="sql"}Debugging{/ts}', 'Debugging', NULL, '', '82', '1', NULL, 14 ), + + ( 97, @domain_id, 'civicrm/admin/mapping&reset=1', '{ts escape="sql"}Import/Export Mappings{/ts}', 'Import/Export Mappings', NULL, '', '80', '1', NULL, 3 ), + ( 98, @domain_id, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql"}Message Templates{/ts}', 'Message Templates', NULL, '', '80', '1', NULL, 4 ), + ( 99, @domain_id, 'civicrm/admin/domain&action=update&reset=1', '{ts escape="sql"}Domain Information{/ts}', 'Domain Information', NULL, '', '80', '1', NULL, 5 ), + ( 100,@domain_id, 'civicrm/admin/options/from_email_address&group=from_email_address&reset=1', '{ts escape="sql"}FROM Email Addresses{/ts}', 'FROM Email Addresses', NULL, '', '80', '1', NULL, 6 ), + ( 101,@domain_id, 'civicrm/admin/setting/updateConfigBackend&reset=1', '{ts escape="sql"}Update Directory Path and URL{/ts}', 'Update Directory Path and URL', NULL, '', '80', '1', NULL, 7 ), + + ( 102, @domain_id, NULL, '{ts escape="sql"}Manage{/ts}', 'Manage', NULL, '', '73', '1', NULL, 4 ), + ( 103, @domain_id, 'civicrm/admin/deduperules&reset=1', '{ts escape="sql"}Find and Merge Duplicate Contacts{/ts}', 'Find and Merge Duplicate Contacts', '', '', '102', '1', NULL, 1 ), + ( 104, @domain_id, 'civicrm/admin/access&reset=1', '{ts escape="sql"}Access Control{/ts}', 'Access Control', NULL, '', '102', '1', NULL, 2 ), + ( 105, @domain_id, 'civicrm/admin/synchUser&reset=1', '{ts escape="sql"}Synchronize Users to Contacts{/ts}', 'Synchronize Users to Contacts', NULL, '', '102', '1', NULL, 3 ), + + ( 106, @domain_id, NULL, '{ts escape="sql"}Option Lists{/ts}', 'Option Lists', NULL, '', '73', '1', NULL, 5 ), + ( 107, @domain_id, 'civicrm/admin/options/activity_type&reset=1&group=activity_type', '{ts escape="sql"}Activity Types{/ts}', 'Activity Types', NULL, '', '106', '1', NULL, 1 ), + ( 108, @domain_id, 'civicrm/admin/reltype&reset=1', '{ts escape="sql"}Relationship Types{/ts}', 'Relationship Types', NULL, '', '106', '1', NULL, 2 ), + ( 109, @domain_id, 'civicrm/admin/tag&reset=1', '{ts escape="sql"}Tags (Categories){/ts}', 'Tags (Categories)', NULL, '', '106', '1', 1, 3 ), + ( 110, @domain_id, 'civicrm/admin/options/gender&reset=1&group=gender', '{ts escape="sql"}Gender Options{/ts}', 'Gender Options', NULL, '', '106', '1', NULL, 4 ), + ( 111, @domain_id, 'civicrm/admin/options/individual_prefix&group=individual_prefix&reset=1', '{ts escape="sql"}Individual Prefixes (Ms, Mr...){/ts}', 'Individual Prefixes (Ms, Mr...)', NULL, '', '106', '1', NULL, 5 ), + ( 112, @domain_id, 'civicrm/admin/options/individual_suffix&group=individual_suffix&reset=1', '{ts escape="sql"}Individual Suffixes (Jr, Sr...){/ts}', 'Individual Suffixes (Jr, Sr...)', NULL, '', '106', '1', 1, 6 ), + ( 113, @domain_id, 'civicrm/admin/options/addressee&group=addressee&reset=1', '{ts escape="sql"}Addressee Formats{/ts}', 'Addressee Formats', NULL, '', '106', '1', NULL, 7 ), + ( 114, @domain_id, 'civicrm/admin/options/email_greeting&group=email_greeting&reset=1', '{ts escape="sql"}Email Greetings{/ts}', 'Email Greetings', NULL, '', '106', '1', NULL, 8 ), + ( 115, @domain_id, 'civicrm/admin/options/postal_greeting&group=postal_greeting&reset=1', '{ts escape="sql"}Postal Greetings{/ts}', 'Postal Greetings', NULL, '', '106', '1', 1, 9 ), + ( 116, @domain_id, 'civicrm/admin/options/instant_messenger_service&group=instant_messenger_service&reset=1', '{ts escape="sql"}Instant Messenger Services{/ts}', 'Instant Messenger Services', NULL, '', '106', '1', NULL, 10 ), + ( 117, @domain_id, 'civicrm/admin/locationType&reset=1', '{ts escape="sql"}Location Types (Home, Work...){/ts}', 'Location Types (Home, Work...)', NULL, '', '106', '1', NULL, 11 ), + ( 118, @domain_id, 'civicrm/admin/options/mobile_provider&group=mobile_provider&reset=1', '{ts escape="sql"}Mobile Phone Providers{/ts}', 'Mobile Phone Providers', NULL, '', '106', '1', NULL, 12 ), + ( 119, @domain_id, 'civicrm/admin/options/phone_type&group=phone_type&reset=1', '{ts escape="sql"}Phone Types{/ts}', 'Phone Types', NULL, '', '106', '1', NULL, 13 ), + ( 120, @domain_id, 'civicrm/admin/options/preferred_communication_method&group=preferred_communication_method&reset=1', '{ts escape="sql"}Preferred Communication Methods{/ts}', 'Preferred Communication Methods', NULL, '', '106', '1', NULL, 14 ), + + ( 121, @domain_id, NULL, '{ts escape="sql"}CiviCase{/ts}', 'CiviCase', 'access CiviCase,administer CiviCRM', 'AND', '73', '1', NULL, 6 ), + ( 122, @domain_id, 'civicrm/admin/options/case_type&group=case_type&reset=1', '{ts escape="sql"}Case Types{/ts}', 'Case Types', 'access CiviCase,administer CiviCRM', '', '121', '1', NULL, 1 ), + ( 123, @domain_id, 'civicrm/admin/options/redaction_rule&group=redaction_rule&reset=1', '{ts escape="sql"}Redaction Rules{/ts}', 'Redaction Rules', 'access CiviCase,administer CiviCRM', '', '121', '1', NULL, 2 ), + + ( 124, @domain_id, NULL, '{ts escape="sql"}CiviContribute{/ts}', 'CiviContribute', 'access CiviContribute,administer CiviCRM', 'AND', '73', '1', NULL, 7 ), + ( 125, @domain_id, 'civicrm/admin/contribute&reset=1&action=add', '{ts escape="sql"}New Contribution Page{/ts}', 'New Contribution Page', NULL, '', '124', '1', NULL, 6 ), + ( 126, @domain_id, 'civicrm/admin/contribute&reset=1', '{ts escape="sql"}Manage Contribution Pages{/ts}', 'Manage Contribution Pages', NULL, '', '124', '1', '1', 7 ), + ( 127, @domain_id, 'civicrm/admin/pcp&reset=1', '{ts escape="sql"}Personal Campaign Pages{/ts}', 'Personal Campaign Pages', NULL, '', '124', '1', NULL, 8 ), + ( 128, @domain_id, 'civicrm/admin/contribute/managePremiums&reset=1', '{ts escape="sql"}Premiums (Thank-you Gifts){/ts}', 'Premiums', NULL, '', '124', '1', 1, 9 ), + ( 129, @domain_id, 'civicrm/admin/contribute/contributionType&reset=1', '{ts escape="sql"}Contribution Types{/ts}', 'Contribution Types', NULL, '', '124', '1', NULL, 10 ), + ( 130, @domain_id, 'civicrm/admin/options/payment_instrument&group=payment_instrument&reset=1', '{ts escape="sql"}Payment Instruments{/ts}', 'Payment Instruments', NULL, '', '124', '1', NULL, 11 ), + ( 131, @domain_id, 'civicrm/admin/options/accept_creditcard&group=accept_creditcard&reset=1', '{ts escape="sql"}Accepted Credit Cards{/ts}', 'Accepted Credit Cards', NULL, '', '124', '1', NULL, 12 ), + + ( 132, @domain_id, NULL, '{ts escape="sql"}CiviEvent{/ts}', 'CiviEvent', 'access CiviEvent,administer CiviCRM', 'AND', '73', '1', NULL, 8 ), + ( 133, @domain_id, 'civicrm/event/add&reset=1&action=add', '{ts escape="sql"}New Event{/ts}', 'New Event', NULL, '', '132', '1', NULL, 1 ), + ( 134, @domain_id, 'civicrm/event/manage&reset=1', '{ts escape="sql"}Manage Events{/ts}', 'Manage Events', NULL, '', '132', '1', 1, 2 ), + ( 135, @domain_id, 'civicrm/admin/eventTemplate&reset=1', '{ts escape="sql"}Event Templates{/ts}', 'Event Templates', 'access CiviEvent,administer CiviCRM', '', '132', '1', 1, 3 ), + ( 136, @domain_id, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql"}New Price Set{/ts}', 'New Price Set', NULL, '', '132', '1', NULL, 4 ), ( 137, @domain_id, 'civicrm/event/price&reset=1', '{ts escape="sql"}Manage Price Sets{/ts}', 'Manage Price Sets', NULL, '', '132', '1', 1, 5 ), - ( 138, @domain_id, 'civicrm/admin/options/participant_listing&group=participant_listing&reset=1', '{ts escape="sql"}Participant Listing Templates{/ts}', 'Participant Listing Templates', NULL, '', '132', '1', NULL, 6 ), - ( 139, @domain_id, 'civicrm/admin/options/event_type&group=event_type&reset=1', '{ts escape="sql"}Event Types{/ts}', 'Event Types', NULL, '', '132', '1', NULL, 7 ), - ( 140, @domain_id, 'civicrm/admin/participant_status&reset=1', '{ts escape="sql"}Participant Statuses{/ts}', 'Participant Statuses', NULL, '', '132', '1', NULL, 8 ), - ( 141, @domain_id, 'civicrm/admin/options/participant_role&group=participant_role&reset=1', '{ts escape="sql"}Participant Roles{/ts}', 'Participant Roles', NULL, '', '132', '1', NULL, 9 ), - - ( 142, @domain_id, NULL, '{ts escape="sql"}CiviGrant{/ts}', 'CiviGrant', 'access CiviGrant,administer CiviCRM', 'AND', '73', '1', NULL, 9 ), - ( 143, @domain_id, 'civicrm/admin/options/grant_type&group=grant_type&reset=1', '{ts escape="sql"}Grant Types{/ts}', 'Grant Types', 'access CiviGrant,administer CiviCRM', '', '142', '1', NULL, 1 ), - - ( 144, @domain_id, NULL, '{ts escape="sql"}CiviMail{/ts}', 'CiviMail', 'access CiviMail,administer CiviCRM', 'AND', '73', '1', NULL, 10 ), - ( 145, @domain_id, 'civicrm/admin/component&reset=1', '{ts escape="sql"}Headers, Footers, and Automated Messages{/ts}', 'Headers, Footers, and Automated Messages', NULL, '', '144', '1', NULL, 1 ), - ( 146, @domain_id, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql"}Message Templates{/ts}', 'Message Templates', NULL, '', '144', '1', NULL, 2 ), - ( 147, @domain_id, 'civicrm/admin/options/from_email&group=from_email_address&reset=1', '{ts escape="sql"}From Email Addresses{/ts}', 'From Email Addresses', NULL, '', '144', '1', NULL, 3 ), - ( 148, @domain_id, 'civicrm/admin/mailSettings&reset=1', '{ts escape="sql"}Mail Accounts{/ts}', 'Mail Accounts', NULL, '', '144', '1', NULL, 4 ), - - ( 149, @domain_id, NULL, '{ts escape="sql"}CiviMember{/ts}', 'CiviMember', 'access CiviMember,administer CiviCRM', 'AND', '73', '1', NULL, 11 ), - ( 150, @domain_id, 'civicrm/admin/member/membershipType&reset=1', '{ts escape="sql"}Membership Types{/ts}', 'Membership Types', 'access CiviMember,administer CiviCRM', '', '149', '1', NULL, 1 ), - ( 151, @domain_id, 'civicrm/admin/member/membershipStatus&reset=1', '{ts escape="sql"}Membership Status Rules{/ts}', 'Membership Status Rules', 'access CiviMember,administer CiviCRM', '', '149', '1', NULL, 2 ), - - ( 152, @domain_id, NULL, '{ts escape="sql"}CiviReport{/ts}', 'CiviReport', 'access CiviReport,administer CiviCRM', 'AND', '73', '1', NULL, 12 ), - ( 153, @domain_id, 'civicrm/report/list&reset=1', '{ts escape="sql"}Reports Listing{/ts}', 'Reports Listing', NULL, '', '152', '1', NULL, 1 ), - ( 154, @domain_id, 'civicrm/admin/report/template/list&reset=1', '{ts escape="sql"}Create Reports from Templates{/ts}', 'Create Reports from Templates', NULL, '', '152', '1', NULL, 2 ), - ( 155, @domain_id, 'civicrm/admin/report/options/report_template&reset=1', '{ts escape="sql"}Manage Templates{/ts}', 'Manage Templates', NULL, '', '152', '1', NULL, 3 ), + ( 138, @domain_id, 'civicrm/admin/options/participant_listing&group=participant_listing&reset=1', '{ts escape="sql"}Participant Listing Templates{/ts}', 'Participant Listing Templates', NULL, '', '132', '1', NULL, 6 ), + ( 139, @domain_id, 'civicrm/admin/options/event_type&group=event_type&reset=1', '{ts escape="sql"}Event Types{/ts}', 'Event Types', NULL, '', '132', '1', NULL, 7 ), + ( 140, @domain_id, 'civicrm/admin/participant_status&reset=1', '{ts escape="sql"}Participant Statuses{/ts}', 'Participant Statuses', NULL, '', '132', '1', NULL, 8 ), + ( 141, @domain_id, 'civicrm/admin/options/participant_role&group=participant_role&reset=1', '{ts escape="sql"}Participant Roles{/ts}', 'Participant Roles', NULL, '', '132', '1', NULL, 9 ), + + ( 142, @domain_id, NULL, '{ts escape="sql"}CiviGrant{/ts}', 'CiviGrant', 'access CiviGrant,administer CiviCRM', 'AND', '73', '1', NULL, 9 ), + ( 143, @domain_id, 'civicrm/admin/options/grant_type&group=grant_type&reset=1', '{ts escape="sql"}Grant Types{/ts}', 'Grant Types', 'access CiviGrant,administer CiviCRM', '', '142', '1', NULL, 1 ), + + ( 144, @domain_id, NULL, '{ts escape="sql"}CiviMail{/ts}', 'CiviMail', 'access CiviMail,administer CiviCRM', 'AND', '73', '1', NULL, 10 ), + ( 145, @domain_id, 'civicrm/admin/component&reset=1', '{ts escape="sql"}Headers, Footers, and Automated Messages{/ts}', 'Headers, Footers, and Automated Messages', NULL, '', '144', '1', NULL, 1 ), + ( 146, @domain_id, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql"}Message Templates{/ts}', 'Message Templates', NULL, '', '144', '1', NULL, 2 ), + ( 147, @domain_id, 'civicrm/admin/options/from_email&group=from_email_address&reset=1', '{ts escape="sql"}From Email Addresses{/ts}', 'From Email Addresses', NULL, '', '144', '1', NULL, 3 ), + ( 148, @domain_id, 'civicrm/admin/mailSettings&reset=1', '{ts escape="sql"}Mail Accounts{/ts}', 'Mail Accounts', NULL, '', '144', '1', NULL, 4 ), + + ( 149, @domain_id, NULL, '{ts escape="sql"}CiviMember{/ts}', 'CiviMember', 'access CiviMember,administer CiviCRM', 'AND', '73', '1', NULL, 11 ), + ( 150, @domain_id, 'civicrm/admin/member/membershipType&reset=1', '{ts escape="sql"}Membership Types{/ts}', 'Membership Types', 'access CiviMember,administer CiviCRM', '', '149', '1', NULL, 1 ), + ( 151, @domain_id, 'civicrm/admin/member/membershipStatus&reset=1', '{ts escape="sql"}Membership Status Rules{/ts}', 'Membership Status Rules', 'access CiviMember,administer CiviCRM', '', '149', '1', NULL, 2 ), + + ( 152, @domain_id, NULL, '{ts escape="sql"}CiviReport{/ts}', 'CiviReport', 'access CiviReport,administer CiviCRM', 'AND', '73', '1', NULL, 12 ), + ( 153, @domain_id, 'civicrm/report/list&reset=1', '{ts escape="sql"}Reports Listing{/ts}', 'Reports Listing', NULL, '', '152', '1', NULL, 1 ), + ( 154, @domain_id, 'civicrm/admin/report/template/list&reset=1', '{ts escape="sql"}Create Reports from Templates{/ts}', 'Create Reports from Templates', NULL, '', '152', '1', NULL, 2 ), + ( 155, @domain_id, 'civicrm/admin/report/options/report_template&reset=1', '{ts escape="sql"}Manage Templates{/ts}', 'Manage Templates', NULL, '', '152', '1', NULL, 3 ), ( 156, @domain_id, 'civicrm/admin/report/register&reset=1', '{ts escape="sql"}Register Report{/ts}', 'Register Report', 'administer Reports', '', '152', '1', NULL, 4 ), - ( 157, @domain_id, NULL, '{ts escape="sql"}Help{/ts}', 'Help', NULL, '', NULL, '1', NULL, 10), - ( 158, @domain_id, 'http://documentation.civicrm.org', '{ts escape="sql"}Documentation{/ts}', 'Documentation', NULL, 'AND', '157', '1', NULL, 1 ), - ( 159, @domain_id, 'http://forum.civicrm.org', '{ts escape="sql"}Community Forums{/ts}', 'Community Forums', NULL, 'AND', '157', '1', NULL, 2 ), - ( 160, @domain_id, 'http://civicrm.org/participate', '{ts escape="sql"}Participate{/ts}', 'Participate', NULL, 'AND', '157', '1', NULL, 3 ), + ( 157, @domain_id, NULL, '{ts escape="sql"}Help{/ts}', 'Help', NULL, '', NULL, '1', NULL, 10), + ( 158, @domain_id, 'http://documentation.civicrm.org', '{ts escape="sql"}Documentation{/ts}', 'Documentation', NULL, 'AND', '157', '1', NULL, 1 ), + ( 159, @domain_id, 'http://forum.civicrm.org', '{ts escape="sql"}Community Forums{/ts}', 'Community Forums', NULL, 'AND', '157', '1', NULL, 2 ), + ( 160, @domain_id, 'http://civicrm.org/participate', '{ts escape="sql"}Participate{/ts}', 'Participate', NULL, 'AND', '157', '1', NULL, 3 ), ( 161, @domain_id, 'http://civicrm.org/aboutcivicrm', '{ts escape="sql"}About{/ts}', 'About', NULL, 'AND', '157', '1', NULL, 4 ), ( 162, @domain_id, 'civicrm/admin/setting/search?reset=1', '{ts escape="sql"}Search Settings{/ts}', 'Search Settings', NULL, '', '82', '1', NULL, 10 ), - - ( 163, @domain_id, NULL, '{ts escape="sql"}Reports{/ts}', 'Reports', 'access CiviReport', '', NULL, '1', NULL, 8 ), + + ( 163, @domain_id, NULL, '{ts escape="sql"}Reports{/ts}', 'Reports', 'access CiviReport', '', NULL, '1', NULL, 8 ), ( 164, @domain_id, 'civicrm/report/list&reset=1', '{ts escape="sql"}Reports Listing{/ts}', 'Reports Listing', NULL, '', '163', '1', NULL, 1 ), - ( 165, @domain_id, 'civicrm/admin/report/template/list&reset=1', '{ts escape="sql"}Create Reports from Templates{/ts}', 'Create Reports from Templates', 'administer Reports', '', '163', '1', 1, 2 ), - + ( 165, @domain_id, 'civicrm/admin/report/template/list&reset=1', '{ts escape="sql"}Create Reports from Templates{/ts}', 'Create Reports from Templates', 'administer Reports', '', '163', '1', 1, 2 ), + ( 166, @domain_id, 'civicrm/report/instance/1&reset=1', '{ts escape="sql"}Constituent Report (Summary){/ts}', '{literal}Constituent Report (Summary){/literal}', 'administer CiviCRM', '', 163, '1', NULL, 3 ), ( 167, @domain_id, 'civicrm/report/instance/2&reset=1', '{ts escape="sql"}Constituent Report (Detail){/ts}', '{literal}Constituent Report (Detail){/literal}', 'administer CiviCRM', '', 163, '1', NULL, 4 ), ( 168, @domain_id, 'civicrm/report/instance/3&reset=1', '{ts escape="sql"}Donor Report (Summary){/ts}', '{literal}Donor Report (Summary){/literal}', 'access CiviContribute', '', 163, '1', NULL, 5 ), @@ -433,16 +433,16 @@ ( 179, @domain_id, 'civicrm/report/instance/14&reset=1', '{ts escape="sql"}Event Income Report (Detail){/ts}', '{literal}Event Income Report (Detail){/literal}', 'access CiviEvent', '', 163, '1', NULL, 16 ), ( 180, @domain_id, 'civicrm/report/instance/15&reset=1', '{ts escape="sql"}Attendee List{/ts}', 'Attendee List', 'access CiviEvent', '', 163, '1', NULL, 17 ), ( 181, @domain_id, 'civicrm/report/instance/16&reset=1', '{ts escape="sql"}Activity Report{/ts}', 'activity', 'administer CiviCRM', '', 163, '1', NULL, 18 ), - ( 182, @domain_id, 'civicrm/report/instance/17&reset=1', '{ts escape="sql"}Relationship Report{/ts}', 'Relationship Report', 'administer CiviCRM', '', 163, '1', NULL, 19 ), + ( 182, @domain_id, 'civicrm/report/instance/17&reset=1', '{ts escape="sql"}Relationship Report{/ts}', 'Relationship Report', 'administer CiviCRM', '', 163, '1', NULL, 19 ), ( 183, @domain_id, 'civicrm/report/instance/18&reset=1', '{ts escape="sql"}Donation Summary Report (Organization){/ts}', '{literal}Donation Summary Report (Organization){/literal}', 'access CiviContribute', '', 163, '1', NULL, 20 ), ( 184, @domain_id, 'civicrm/report/instance/19&reset=1', '{ts escape="sql"}Donation Summary Report (Household){/ts}', '{literal}Donation Summary Report (Household){/literal}', 'access CiviContribute', '', 163, '1', NULL, 21 ), - ( 185, @domain_id, 'civicrm/report/instance/20&reset=1', '{ts escape="sql"}Top Donors Report{/ts}', 'Top Donors Report', 'access CiviContribute', '', 163, '1', NULL, 22 ), + ( 185, @domain_id, 'civicrm/report/instance/20&reset=1', '{ts escape="sql"}Top Donors Report{/ts}', 'Top Donors Report', 'access CiviContribute', '', 163, '1', NULL, 22 ), ( 186, @domain_id, 'civicrm/report/instance/21&reset=1', '{ts escape="sql"}Pledge Summary Report{/ts}', 'Pledge Summary Report', 'access CiviPledge', '', 163, '1', NULL, 23 ), ( 187, @domain_id, 'civicrm/report/instance/22&reset=1', '{ts escape="sql"}Pledged But not Paid Report{/ts}', 'Pledged But not Paid Report', 'access CiviPledge', '', 163, '1', NULL, 24 ); -- End navigation - + -- Enabled the Report Templates SELECT @option_group_id_report := max(id) from civicrm_option_group where name = 'report_template'; @@ -475,7 +475,7 @@ ADD CONSTRAINT `FK_civicrm_report_instance_navigation_id` FOREIGN KEY (`navigation_id`) REFERENCES `civicrm_navigation` (`id`) ON DELETE SET NULL; UPDATE civicrm_report_instance - SET navigation_id = CASE id + SET navigation_id = CASE id WHEN 1 THEN 166 WHEN 2 THEN 167 WHEN 3 THEN 168 @@ -500,7 +500,7 @@ WHEN 22 THEN 187 ELSE navigation_id END; - + -- CRM-4414 -- Add individual, organization and household default profile INSERT INTO civicrm_uf_group @@ -520,7 +520,7 @@ ( 1, 'Profile', NULL, NULL, 3, @uf_group_id_individual ), ( 1, 'Profile', NULL, NULL, 4, @uf_group_id_organization ), ( 1, 'Profile', NULL, NULL, 5, @uf_group_id_household ); - + INSERT INTO civicrm_uf_field (uf_group_id, field_name, is_required, is_reserved, weight, {localize field='label'}label{/localize}, field_type) VALUES @@ -531,7 +531,7 @@ (@uf_group_id_organization, 'email', 1, 0, 2, {localize}'Email Address'{/localize}, 'Contact' ), (@uf_group_id_household, 'household_name', 1, 0, 1, {localize}'Household Name'{/localize}, 'Household' ), (@uf_group_id_household, 'email', 1, 0, 2, {localize}'Email Address'{/localize}, 'Contact' ); - + -- State / province -- CRM-4534 CRM-4686 CRM-4769 INSERT INTO civicrm_state_province @@ -543,7 +543,7 @@ (10006, 'Saba', 'SAB', 1151), (10007, 'St. Eustatius', 'EUA', 1151), (10008, 'St. Maarten', 'SXM', 1151), - (10009, "Jura", "39" , 1076); + (10009, "Jura", "39" , 1076); -- CRM-4587 CRM-4534 CRM-4762 CRM-4394 -- Update the name @@ -555,16 +555,16 @@ WHEN 3808 THEN "Coahuila" WHEN 3809 THEN "Colima" WHEN 3811 THEN "Chihuahua" - ELSE name - END, + ELSE name + END, abbreviation = CASE id - WHEN 2543 THEN "36" - WHEN 2544 THEN "35" - ELSE abbreviation - END, - country_id = CASE id - WHEN 1637 THEN 1008 - ELSE country_id + WHEN 2543 THEN "36" + WHEN 2544 THEN "35" + ELSE abbreviation + END, + country_id = CASE id + WHEN 1637 THEN 1008 + ELSE country_id END; @@ -578,7 +578,7 @@ -- CRM-4687 -- set activity_date = due_date and drop due_date_time column from civicrm_activity. - UPDATE civicrm_activity ca INNER JOIN civicrm_case_activity cca ON ca.id = cca.activity_id + UPDATE civicrm_activity ca INNER JOIN civicrm_case_activity cca ON ca.id = cca.activity_id SET activity_date_time = COALESCE( ca.activity_date_time, ca.due_date_time ); ALTER TABLE civicrm_activity DROP COLUMN due_date_time; @@ -594,13 +594,13 @@ {localize field='waitlist_text'}ADD COLUMN waitlist_text text collate utf8_unicode_ci default NULL COMMENT 'Text to display when the event is full, but participants can signup for a waitlist.'{/localize}, {localize field='approval_req_text'}ADD COLUMN approval_req_text text collate utf8_unicode_ci default NULL COMMENT 'Text to display when the approval is required to complete registration for an event.'{/localize}; - INSERT INTO civicrm_event + INSERT INTO civicrm_event (is_template, {localize field='template_title'}template_title{/localize}, event_type_id, default_role_id, participant_listing_id, is_public, is_monetary, is_online_registration, is_multiple_registrations, allow_same_participant_emails, is_email_confirm, contribution_type_id, {localize field='fee_label'}fee_label{/localize}, {localize field='confirm_title'}confirm_title{/localize}, {localize field='thankyou_title'}thankyou_title{/localize}, {localize field='confirm_from_name'}confirm_from_name{/localize}, confirm_from_email, is_active) VALUES - (1, {localize}'Free Meeting without Online Registration'{/localize}, 4, 1, 1, 1, 0, 0, null, null, null, null, {localize}null{/localize}, {localize}null{/localize}, {localize}null{/localize}, {localize}null{/localize}, null, 1), + (1, {localize}'Free Meeting without Online Registration'{/localize}, 4, 1, 1, 1, 0, 0, null, null, null, null, {localize}null{/localize}, {localize}null{/localize}, {localize}null{/localize}, {localize}null{/localize}, null, 1), (1, {localize}'Free Meeting with Online Registration'{/localize}, 4, 1, 1, 1, 0, 1, 1, 1, 0, null, {localize}null{/localize}, {localize}'Confirm Your Registration Information'{/localize}, {localize}'Thanks for Registering!'{/localize}, {localize}null{/localize}, null, 1), (1, {localize}'Paid Conference with Online Registration'{/localize}, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, {localize}'Conference Fee'{/localize}, {localize}'Confirm Your Registration Information'{/localize}, {localize}'Thanks for Registering!'{/localize}, {localize}'Event Template Dept.'{/localize}, 'event_templates@example.org', 1); - + -- CRM-4138 ALTER TABLE `civicrm_payment_processor_type` ADD COLUMN `payment_type` int unsigned DEFAULT 1 COMMENT 'Payment Type: Credit or Debit'; @@ -609,8 +609,8 @@ -- CRM-4605 -- A. upgrade wt and val by 2 - -- B. Insert Custom data and Address as group for first two empty location - -- C. Update Communication Pref name + -- B. Insert Custom data and Address as group for first two empty location + -- C. Update Communication Pref name -- D. Swap wt and value for Comm Pref, Notes, Demographics and make sure these record has to have wt and val 3, 4, 5 in sequence. -- get option group id for contact_edit_options @@ -627,7 +627,7 @@ VALUES (@option_group_id_ceOpt, {localize}'Custom Data'{/localize}, 1, 'CustomData', NULL, 0, NULL, 1, 0, 0, 1), (@option_group_id_ceOpt, {localize}'Address'{/localize}, 2, 'Address', NULL, 0, NULL, 2, 0, 0, 1); - + -- update Comm pref group name. UPDATE civicrm_option_value SET name = 'CommunicationPreferences' @@ -639,7 +639,7 @@ SET otherRecord.value = commPref.value, otherRecord.weight = commPref.weight, commPref.value = 3, commPref.weight = 3 WHERE otherRecord.value = 3 AND commPref.name = 'CommunicationPreferences' AND commPref.option_group_id = @option_group_id_ceOpt AND otherRecord.option_group_id = @option_group_id_ceOpt; - -- make sure comm has val and wt = 3 + -- make sure comm has val and wt = 3 Update civicrm_option_value SET value = 3, weight = 3 WHERE name = 'CommunicationPreferences' and option_group_id = @option_group_id_ceOpt; @@ -661,7 +661,7 @@ SET otherRecord.value = demographics.value, otherRecord.weight = demographics.weight, demographics.value = 5, demographics.weight=5 WHERE otherRecord.value = 5 AND demographics.name = 'Demographics' AND demographics.option_group_id = @option_group_id_ceOpt AND otherRecord.option_group_id = @option_group_id_ceOpt; - -- make sure Demoghraphics has val and wt = 5 + -- make sure Demoghraphics has val and wt = 5 Update civicrm_option_value SET value = 5, weight = 5 WHERE name = 'Demographics' and option_group_id = @option_group_id_ceOpt; @@ -676,17 +676,17 @@ (@option_group_id_ceOpt, {localize}'Phone'{/localize}, (SELECT @max_val := @max_val+1), 'Phone', NULL, 1, NULL, (SELECT @max_wt := @max_wt+1), 0, 0, 1, NULL, NULL), (@option_group_id_ceOpt, {localize}'Instant Messenger'{/localize}, (SELECT @max_val := @max_val+1), 'IM', NULL, 1, NULL, (SELECT @max_wt := @max_wt+1), 0, 0, 1, NULL, NULL), (@option_group_id_ceOpt, {localize}'Open ID'{/localize}, (SELECT @max_val := @max_val+1), 'OpenID', NULL, 1, NULL, (SELECT @max_wt := @max_wt+1), 0, 0, 1, NULL, NULL); - + -- remove location blocks from address_options. SELECT @option_group_id_adOpt := max(id) from civicrm_option_group where name = 'address_options'; DELETE FROM civicrm_option_value where option_group_id = @option_group_id_adOpt AND name IN ( 'im', 'openid' ); -- update civicrm_preferences.contact_edit_options. -- ideally we should append value, but we did changed wt and values so lets reset it to default. - UPDATE civicrm_preferences - SET contact_edit_options = ( SELECT CONCAT( GROUP_CONCAT('',value SEPARATOR ''), '' ) - FROM civicrm_option_value - WHERE option_group_id = @option_group_id_ceOpt + UPDATE civicrm_preferences + SET contact_edit_options = ( SELECT CONCAT( GROUP_CONCAT('',value SEPARATOR ''), '' ) + FROM civicrm_option_value + WHERE option_group_id = @option_group_id_ceOpt Group by option_group_id ) WHERE is_domain = 1 AND contact_id IS NULL; @@ -705,17 +705,17 @@ DELETE FROM civicrm_option_group WHERE id = @og_id_greeting; -- add email greeting, postal greeting and addressee fields - ALTER TABLE `civicrm_contact` + ALTER TABLE `civicrm_contact` ADD `email_greeting_id` INT(10) UNSIGNED DEFAULT NULL COMMENT 'FK to civicrm_option_value.id, that has to be valid registered Email Greeting.' AFTER `suffix_id`, - ADD `postal_greeting_id` INT(10) UNSIGNED DEFAULT NULL COMMENT 'FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.' AFTER `email_greeting_id`, - ADD `addressee_id` INT(10) UNSIGNED DEFAULT NULL COMMENT 'FK to civicrm_option_value.id, that has to be valid registered Addressee.' AFTER `postal_greeting_id`, + ADD `postal_greeting_id` INT(10) UNSIGNED DEFAULT NULL COMMENT 'FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.' AFTER `email_greeting_id`, + ADD `addressee_id` INT(10) UNSIGNED DEFAULT NULL COMMENT 'FK to civicrm_option_value.id, that has to be valid registered Addressee.' AFTER `postal_greeting_id`, {localize field='email_greeting_display'}ADD email_greeting_display VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Cache Email greeting.' AFTER email_greeting_id{/localize}, {localize field='postal_greeting_display'}ADD postal_greeting_display VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Cache Postal greeting.' AFTER postal_greeting_id{/localize}, {localize field='addressee_display'}ADD addressee_display VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Cache Addressee.' AFTER addressee_id{/localize}, ADD `email_greeting_custom` VARCHAR(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Custom Email Greeting.' AFTER `email_greeting_id`, ADD `postal_greeting_custom` VARCHAR(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Custom Postal greeting.' AFTER `postal_greeting_id`, ADD `addressee_custom` VARCHAR(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Custom Addressee.' AFTER `addressee_id`; - + SELECT @og_id_emailGreeting := max(id) FROM civicrm_option_group WHERE name = 'email_greeting'; SELECT @og_id_postalGreeting := max(id) FROM civicrm_option_group WHERE name = 'postal_greeting'; @@ -744,34 +744,34 @@ (@og_id_addressee, 2, 2, 1, 2, 0, 1, {localize}'{ldelim}contact.household_name{rdelim}'{/localize}, '{ldelim}contact.household_name{rdelim}'), (@og_id_addressee, 3, 3, 1, 3, 0, 1, {localize}'{ldelim}contact.organization_name{rdelim}'{/localize}, '{ldelim}contact.organization_name{rdelim}'), (@og_id_addressee, 4, 0, 0, 4, 1, 1, {localize}'Customized'{/localize}, 'Customized'); - - -- Set civicrm_contact.email_greeting_id and postal_greeting_id to default value for the given contact type. + + -- Set civicrm_contact.email_greeting_id and postal_greeting_id to default value for the given contact type. SELECT @value := value - FROM civicrm_option_value + FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = @og_id_emailGreeting - AND civicrm_option_value.filter = 1 + AND civicrm_option_value.filter = 1 AND civicrm_option_value.is_default = 1; UPDATE civicrm_contact - SET + SET {localize field='email_greeting_display, first_name'}email_greeting_display = CONCAT("Dear ", first_name){/localize}, {localize field='postal_greeting_display, first_name'}postal_greeting_display = CONCAT("Dear ", first_name){/localize}, email_greeting_id = @value, - postal_greeting_id = @value + postal_greeting_id = @value WHERE contact_type = 'Individual'; SELECT @value := value FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = @og_id_emailGreeting - AND civicrm_option_value.filter = 2 + AND civicrm_option_value.filter = 2 AND civicrm_option_value.is_default = 1; UPDATE civicrm_contact - SET + SET {localize field='email_greeting_display, household_name'}email_greeting_display = CONCAT("Dear ", household_name){/localize}, {localize field='postal_greeting_display, household_name'}postal_greeting_display = CONCAT("Dear ", household_name){/localize}, email_greeting_id = @value, postal_greeting_id = @value WHERE contact_type = 'Household'; - -- Set civicrm_contact.addressee_id to default value for the given contact type. + -- Set civicrm_contact.addressee_id to default value for the given contact type. SELECT @value := value FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = @og_id_addressee @@ -795,12 +795,12 @@ WHERE contact_type = 'Household'; SELECT @value := value - FROM civicrm_option_value + FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = @og_id_addressee - AND civicrm_option_value.filter = 3 + AND civicrm_option_value.filter = 3 AND civicrm_option_value.is_default = 1; UPDATE civicrm_contact - SET + SET {localize field='addressee_display, organization_name'}addressee_display = organization_name{/localize}, addressee_id = @value WHERE contact_type = 'Organization'; @@ -809,36 +809,36 @@ ALTER TABLE `civicrm_group_organization` DROP FOREIGN KEY `FK_civicrm_group_organization_group_id`, DROP FOREIGN KEY `FK_civicrm_group_organization_organization_id`; - + ALTER TABLE `civicrm_group_organization` ADD CONSTRAINT `FK_civicrm_group_organization_group_id` FOREIGN KEY (`group_id`) REFERENCES `civicrm_group` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `FK_civicrm_group_organization_organization_id` FOREIGN KEY (`organization_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE, ADD UNIQUE `UI_group_organization` ( `group_id` , `organization_id` ); - + -- CRM-4697 - + ALTER TABLE `civicrm_payment_processor` ADD `domain_id` INT(10) UNSIGNED NOT NULL COMMENT 'Which Domain is this match entry for' AFTER `id`; UPDATE `civicrm_payment_processor` SET domain_id = @domain_id; - ALTER TABLE `civicrm_payment_processor` + ALTER TABLE `civicrm_payment_processor` ADD CONSTRAINT `FK_civicrm_payment_processor_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`); - + ALTER TABLE `civicrm_membership_type` ADD `domain_id` INT(10) UNSIGNED NOT NULL COMMENT 'Which Domain is this match entry for' AFTER `id`; UPDATE `civicrm_membership_type` SET domain_id = @domain_id; ALTER TABLE `civicrm_membership_type` ADD CONSTRAINT `FK_civicrm_membership_type_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`); - + ALTER TABLE `civicrm_menu` ADD `domain_id` INT(10) UNSIGNED NOT NULL COMMENT 'Which Domain is this match entry for' AFTER `id`; UPDATE `civicrm_menu` SET domain_id = @domain_id; ALTER TABLE `civicrm_menu` ADD CONSTRAINT `FK_civicrm_menu_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`); - + -- CRM-4813 ALTER TABLE `civicrm_menu` - DROP INDEX `UI_path`, + DROP INDEX `UI_path`, ADD UNIQUE `UI_path_domain_id` ( `path`,`domain_id` ); ALTER TABLE `civicrm_payment_processor` @@ -853,12 +853,12 @@ ALTER TABLE `civicrm_preferences` ADD CONSTRAINT `FK_civicrm_preferences_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `FK_civicrm_preferences_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE; - + ALTER TABLE `civicrm_uf_match` DROP FOREIGN KEY `FK_civicrm_uf_match_contact_id`, DROP INDEX `UI_uf_name` , DROP INDEX `UI_contact` ; - + ALTER TABLE `civicrm_uf_match` ADD `domain_id` INT(10) UNSIGNED NOT NULL COMMENT 'Which Domain is this match entry for' AFTER `id`; UPDATE `civicrm_uf_match` SET domain_id = @domain_id; @@ -867,15 +867,15 @@ ADD CONSTRAINT `FK_civicrm_uf_match_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE, ADD UNIQUE `UI_uf_name_domain_id` (`uf_name`,`domain_id`), ADD UNIQUE `UI_contact_domain_id` (`contact_id`,`domain_id`); - + ALTER TABLE `civicrm_mailing` ADD `created_date` datetime default NULL COMMENT 'Date and time this mailing was created.' AFTER `created_id`; - + ALTER TABLE `civicrm_contribution_page` ADD `created_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_contact, who created this contribution page', ADD `created_date` datetime default NULL COMMENT 'Date and time that contribution page was created.', ADD CONSTRAINT `FK_civicrm_contribution_page_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE; - + ALTER TABLE `civicrm_event` ADD `created_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_contact, who created this event', ADD `created_date` datetime default NULL COMMENT 'Date and time that event was created.', @@ -884,12 +884,12 @@ -- CRM-4842 ALTER TABLE `civicrm_mailing` DROP FOREIGN KEY `FK_civicrm_mailing_created_id`, - DROP FOREIGN KEY `FK_civicrm_mailing_scheduled_id`; + DROP FOREIGN KEY `FK_civicrm_mailing_scheduled_id`; ALTER TABLE `civicrm_mailing` - ADD CONSTRAINT `FK_civicrm_mailing_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL, - ADD CONSTRAINT `FK_civicrm_mailing_scheduled_id` FOREIGN KEY (`scheduled_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL; - + ADD CONSTRAINT `FK_civicrm_mailing_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL, + ADD CONSTRAINT `FK_civicrm_mailing_scheduled_id` FOREIGN KEY (`scheduled_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL; + -- CRM-4469 -- Add collapse_adv_search column to civicrm_custom_group ALTER TABLE `civicrm_custom_group` @@ -897,7 +897,7 @@ ADD `created_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_contact, who created this custom group', ADD `created_date` datetime default NULL COMMENT 'Date and time this custom group was created.', ADD CONSTRAINT `FK_civicrm_custom_group_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE; - + ALTER TABLE `civicrm_uf_group` ADD `created_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_contact, who created this UF group', ADD `created_date` datetime default NULL COMMENT 'Date and time this UF group was created.', diff --git a/CRM/Upgrade/Incremental/sql/3.0.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.0.alpha2.mysql.tpl index 62b8f01563..9212721a18 100644 --- a/CRM/Upgrade/Incremental/sql/3.0.alpha2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.0.alpha2.mysql.tpl @@ -7,4 +7,4 @@ INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( @domain_id, 'civicrm/contact/view/pledge&reset=1&action=add&context=standalone', '{ts escape="sql"}New Pledge{/ts}','New Pledge', NULL, '', @nav_pl, '1', NULL, @nav_pl_wt+1 ); + ( @domain_id, 'civicrm/contact/view/pledge&reset=1&action=add&context=standalone', '{ts escape="sql"}New Pledge{/ts}','New Pledge', NULL, '', @nav_pl, '1', NULL, @nav_pl_wt+1 ); diff --git a/CRM/Upgrade/Incremental/sql/3.0.alpha3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.0.alpha3.mysql.tpl index 7b01d028b0..b7c38780ea 100644 --- a/CRM/Upgrade/Incremental/sql/3.0.alpha3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.0.alpha3.mysql.tpl @@ -1,3 +1,2 @@ - -- CRM-4900 + -- CRM-4900 UPDATE civicrm_worldregion SET name = "America South, Central, North and Caribbean" WHERE id = 2; - \ No newline at end of file diff --git a/CRM/Upgrade/Incremental/sql/3.0.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.0.beta1.mysql.tpl index 4345e57b34..b68fea4ce2 100644 --- a/CRM/Upgrade/Incremental/sql/3.0.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.0.beta1.mysql.tpl @@ -41,12 +41,12 @@ {/if} -- CRM-4935 - ALTER TABLE `civicrm_activity` - CHANGE `source_contact_id` `source_contact_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.', - DROP FOREIGN KEY `FK_civicrm_activity_source_contact_id`; + ALTER TABLE `civicrm_activity` + CHANGE `source_contact_id` `source_contact_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.', + DROP FOREIGN KEY `FK_civicrm_activity_source_contact_id`; ALTER TABLE `civicrm_activity` - ADD CONSTRAINT `FK_civicrm_activity_source_contact_id` FOREIGN KEY (`source_contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL; + ADD CONSTRAINT `FK_civicrm_activity_source_contact_id` FOREIGN KEY (`source_contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL; --CRM-4605 ALTER TABLE `civicrm_preferences` DROP `location_count`; diff --git a/CRM/Upgrade/Incremental/sql/3.0.beta2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.0.beta2.mysql.tpl index 87e6c2d372..e26681b9a8 100644 --- a/CRM/Upgrade/Incremental/sql/3.0.beta2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.0.beta2.mysql.tpl @@ -1,8 +1,8 @@ -- CRM-4979 INSERT INTO civicrm_acl - (name, deny, entity_table, entity_id, operation, object_table, object_id, acl_table, acl_id, is_active) -VALUES + (name, deny, entity_table, entity_id, operation, object_table, object_id, acl_table, acl_id, is_active) +VALUES ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete activities', NULL, NULL, NULL, 1), ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviContribute', NULL, NULL, NULL, 1), ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviMail', NULL, NULL, NULL, 1), diff --git a/CRM/Upgrade/Incremental/sql/3.1.0.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.0.mysql.tpl index 97dffbbf29..a3d552702d 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.0.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.0.mysql.tpl @@ -18,7 +18,7 @@ VALUES VALUES ( {foreach from=$locales item=locale}'Deceased',{/foreach} 0, 1, 1, 1, (SELECT @maxWeight := @maxWeight + 1), 0 ); {else} - INSERT INTO civicrm_membership_status + INSERT INTO civicrm_membership_status ( name, is_current_member, is_admin, is_active, is_reserved, weight, is_default ) VALUES ( 'Deceased', 0, 1, 1, 1, (SELECT @maxWeight := @maxWeight + 1), 0 ); diff --git a/CRM/Upgrade/Incremental/sql/3.1.3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.3.mysql.tpl index acaa0202d9..ad7b0b8e65 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.3.mysql.tpl @@ -1,30 +1,29 @@ --- CRM-5824 -{if $multilingual} +-- CRM-5824 +{if $multilingual} {foreach from=$locales item=locale} - UPDATE civicrm_option_value ov + UPDATE civicrm_option_value ov INNER JOIN civicrm_option_group og ON ( og.id = ov.option_group_id ) SET ov.name = ov.label_{$locale} - WHERE og.name = 'activity_type' + WHERE og.name = 'activity_type' AND ov.name IS NULL; {/foreach} {else} - UPDATE civicrm_option_value ov + UPDATE civicrm_option_value ov INNER JOIN civicrm_option_group og ON ( og.id = ov.option_group_id ) SET ov.name = ov.label - WHERE og.name = 'activity_type' + WHERE og.name = 'activity_type' AND ov.name IS NULL; {/if} - + -- CRM-5825 UPDATE civicrm_menu SET is_ssl = 1 WHERE path = 'civicrm/event/manage'; - + -- CRM-5872 - - UPDATE civicrm_option_value ov + + UPDATE civicrm_option_value ov INNER JOIN civicrm_option_group og ON ( og.id = ov.option_group_id ) SET ov.is_reserved = 1 WHERE ov.name = 'Bulk Email' AND og.name = 'activity_type'; - \ No newline at end of file diff --git a/CRM/Upgrade/Incremental/sql/3.1.4.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.4.mysql.tpl index 70c7302fd0..ff1ac7c81a 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.4.mysql.tpl @@ -3,29 +3,29 @@ UPDATE civicrm_state_province SET name = 'Guizhou' WHERE name = 'Gulzhou'; -- CRM-5824 {if $multilingual} - UPDATE civicrm_option_value ov + UPDATE civicrm_option_value ov INNER JOIN civicrm_option_group og ON ( og.id = ov.option_group_id ) SET ov.name = ov.label_{$config->lcMessages} - WHERE og.name = 'case_type' + WHERE og.name = 'case_type' AND ov.name IS NULL; {else} - UPDATE civicrm_option_value ov + UPDATE civicrm_option_value ov INNER JOIN civicrm_option_group og ON ( og.id = ov.option_group_id ) SET ov.name = ov.label - WHERE og.name = 'case_type' + WHERE og.name = 'case_type' AND ov.name IS NULL; {/if} -- CRM-6008 {if $multilingual} -INSERT INTO civicrm_membership_status +INSERT INTO civicrm_membership_status ({localize field='name'}`name`{/localize}, `start_event`, `end_event`, `is_current_member`, `is_admin`, `weight`, `is_default`, `is_active`, `is_reserved`) (SELECT {localize}'Pending'{/localize}, 'join_date', 'join_date', 0, 0, 5, 0, 1, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM civicrm_membership_status WHERE `name_{$config->lcMessages}` = 'Pending')); - + UPDATE `civicrm_membership_status` SET `is_reserved` = 1 WHERE `name_{$config->lcMessages}` = 'Pending'; {else} - INSERT INTO civicrm_membership_status + INSERT INTO civicrm_membership_status (`name`, `start_event`, `end_event`, `is_current_member`, `is_admin`, `weight`, `is_default`, `is_active`, `is_reserved`) (SELECT 'Pending', 'join_date', 'join_date', 0, 0, 5, 0, 1, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM civicrm_membership_status WHERE name = 'Pending')); diff --git a/CRM/Upgrade/Incremental/sql/3.1.5.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.5.mysql.tpl index 17a8db7826..45ed177e75 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.5.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.5.mysql.tpl @@ -2,7 +2,7 @@ {include file='../CRM/Upgrade/3.1.5.msg_template/civicrm_msg_template.tpl'} -- CRM-6156 --- Update the names of several existing Taiwan provinces +-- Update the names of several existing Taiwan provinces UPDATE civicrm_state_province SET name = 'Changhua County' WHERE id = 4848; UPDATE civicrm_state_province SET name = 'Chiayi County' WHERE id = 4849; UPDATE civicrm_state_province SET name = 'Hsinchu County' WHERE id = 4850; @@ -21,7 +21,7 @@ UPDATE civicrm_state_province SET name = 'Taoyuan County' WHERE id = 4862; UPDATE civicrm_state_province SET name = 'Yunlin Conuty' WHERE id = 4863; UPDATE civicrm_state_province SET name = 'Keelung City' WHERE id = 4864; --- Create additional Taiwan provinces +-- Create additional Taiwan provinces SELECT @country_id := id from civicrm_country where name = 'Taiwan'; INSERT INTO civicrm_state_province ( country_id, abbreviation, name ) VALUES ( @country_id, 'TXG', 'Taichung City' ), diff --git a/CRM/Upgrade/Incremental/sql/3.1.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.alpha1.mysql.tpl index bc53ac2a6c..d7f52d9c20 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.alpha1.mysql.tpl @@ -5,13 +5,13 @@ ALTER TABLE civicrm_contribution MODIFY column amount_level text collate utf8_unicode_ci default NULL; --- subtype upgrade TODOs: +-- subtype upgrade TODOs: -- make changes for CRM-4970 -- modify contact_type column definition ALTER TABLE `civicrm_contact` MODIFY column contact_type varchar(64) collate utf8_unicode_ci DEFAULT NULL COMMENT 'Type of Contact'; - --- add table definiton and data for civicrm_contact_type table + +-- add table definiton and data for civicrm_contact_type table CREATE TABLE civicrm_contact_type ( id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contact Type ID', name varchar(64) COMMENT 'Internal name of Contact Type (or Subtype).', @@ -22,33 +22,33 @@ is_active tinyint COMMENT 'Is this entry active?', is_reserved tinyint COMMENT 'Is this contact type a predefined system type', PRIMARY KEY ( id ), - UNIQUE INDEX contact_type(name), - CONSTRAINT FK_civicrm_contact_type_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_contact_type(id) + UNIQUE INDEX contact_type(name), + CONSTRAINT FK_civicrm_contact_type_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_contact_type(id) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; - INSERT INTO civicrm_contact_type - ( id, name,{localize field='label'}`label`{/localize},image_URL, parent_id, is_active,is_reserved ) + INSERT INTO civicrm_contact_type + ( id, name,{localize field='label'}`label`{/localize},image_URL, parent_id, is_active,is_reserved ) VALUES (1, 'Individual', {localize}'Individual'{/localize}, NULL, NULL, 1,1), (2, 'Household', {localize}'Household'{/localize}, NULL, NULL, 1,1), (3, 'Organization', {localize}'Organization'{/localize},NULL, NULL, 1,1); - - + + -- CRM-5218 -- added menu for contact types in navigation SELECT @domain_id := min(id) FROM civicrm_domain; SELECT @nav_ol := id FROM civicrm_navigation WHERE name = 'Option Lists'; SELECT @nav_ol_wt := max(weight) from civicrm_navigation WHERE parent_id = @nav_ol; INSERT INTO `civicrm_navigation` - ( domain_id, url, label, name,permission, permission_operator, parent_id, is_active, has_separator, weight ) + ( domain_id, url, label, name,permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES ( @domain_id,'civicrm/admin/options/subtype&reset=1', 'Contact Types', 'Contact Types', 'administer CiviCRM', '', @nav_ol, '1', NULL, @nav_ol_wt+1 ); - --- make changes for CRM-5100 + +-- make changes for CRM-5100 ALTER TABLE `civicrm_relationship_type` ADD `contact_sub_type_a` varchar(64) collate utf8_unicode_ci DEFAULT NULL AFTER `contact_type_b`, ADD `contact_sub_type_b` varchar(64) collate utf8_unicode_ci DEFAULT NULL AFTER `contact_sub_type_a`; - + -- Upgrade FCKEditor to CKEditor CRM-5226 {if $multilingual} {foreach from=$locales item=locale} @@ -67,15 +67,15 @@ UPDATE `civicrm_preferences` SET `contact_autocomplete_options` = '12' WHERE `civicrm_preferences`.`id` =1 LIMIT 1; -- Insert values for option group - INSERT INTO - `civicrm_option_group` (`name`, {localize field='description'}`description`{/localize}, `is_reserved`, `is_active`) - VALUES + INSERT INTO + `civicrm_option_group` (`name`, {localize field='description'}`description`{/localize}, `is_reserved`, `is_active`) + VALUES ('contact_autocomplete_options', {localize}'Autocomplete Contact Search'{/localize} , 0, 1); - + SELECT @option_group_id_acsOpt := max(id) from civicrm_option_group where name = 'contact_autocomplete_options'; INSERT INTO `civicrm_option_value` - (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) + (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_acsOpt, {localize}'Email Address'{/localize} , 2, 'email', NULL, 0, NULL, 2, 0, 0, 1, NULL, NULL), (@option_group_id_acsOpt, {localize}'Phone'{/localize} , 3, 'phone', NULL, 0, NULL, 3, 0, 0, 1, NULL, NULL), @@ -87,7 +87,7 @@ -- CRM-5095 ALTER TABLE `civicrm_price_set` ADD `extends` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL COMMENT 'What components are using this price set?'; - + UPDATE `civicrm_price_set` SET extends = (select id from civicrm_component where name = 'CiviEvent'); -- CRM-4160 @@ -104,31 +104,31 @@ /* Set references to obsolete UK counties to NULL */ UPDATE `civicrm_address` SET `state_province_id` = NULL WHERE `state_province_id` IN ('2596', '2599', '2600', '2601', '2602', '2603', '2604', '2605', '2607', '2608', '2609', '2610', '2611', - '2613', '2614', '2615', '2616', '2617', '2618', '2619', '2621', '2623', '2624', '2625', '2627', '2628', - '2629', '2630', '2631', '2632', '2633', '2636', '2637', '2638', '2640', '2641', '2642', '2644', '2645', - '2646', '2650', '2653', '2656', '2658', '2667', '2672', '2673', '2676', '2677', '2679', '2680', '2681', + '2613', '2614', '2615', '2616', '2617', '2618', '2619', '2621', '2623', '2624', '2625', '2627', '2628', + '2629', '2630', '2631', '2632', '2633', '2636', '2637', '2638', '2640', '2641', '2642', '2644', '2645', + '2646', '2650', '2653', '2656', '2658', '2667', '2672', '2673', '2676', '2677', '2679', '2680', '2681', '2683', '2684', '2685', '2686', '2690', '2691', '2693', '2695', '2696', '2697', '2698', '2700', '2701', '2701', '2702', '2703', '2704', '2706', '2707', '2708', '2710', '2711', '2713', '2714', '2716', '2717', '2719', '2720', '2721', '2722', '2724', '2725', '2727', '2728', '2729', '2730', '2731', '2732', '2733', '2736', '2737', '2739', '2740', '2741', '2745', '2751', '2753', '2754', '2755', '2756', '2758', '2759', - '2760', '2762', '2763', '2764', '2765', '2767', '2768', '2769', '2771', '2772', '2775', '2776', '2781', - '2782', '2783', '2784', '2787', '2788', '2789', '2790', '2792', '2794', '2795', '2796', '2797', '2798', - '2799', '2800', '2801', '2802', '2803', '2805', '2806', '2807', '2808', '2809', '2810', '2816', '2817', + '2760', '2762', '2763', '2764', '2765', '2767', '2768', '2769', '2771', '2772', '2775', '2776', '2781', + '2782', '2783', '2784', '2787', '2788', '2789', '2790', '2792', '2794', '2795', '2796', '2797', '2798', + '2799', '2800', '2801', '2802', '2803', '2805', '2806', '2807', '2808', '2809', '2810', '2816', '2817', '2819', '2820', '2821', '2822', '2824', '2825', '9987', '9995', '9996', '9997', '2812', '2718', '2715' ); /* Delete obsolete UK counties */ DELETE FROM `civicrm_state_province` WHERE `id` IN ('2596', '2599', '2600', '2601', '2602', '2603', '2604', '2605', '2607', '2608', '2609', '2610', '2611', - '2613', '2614', '2615', '2616', '2617', '2618', '2619', '2621', '2623', '2624', '2625', '2627', '2628', - '2629', '2630', '2631', '2632', '2633', '2636', '2637', '2638', '2640', '2641', '2642', '2644', '2645', - '2646', '2650', '2653', '2656', '2658', '2667', '2672', '2673', '2676', '2677', '2679', '2680', '2681', + '2613', '2614', '2615', '2616', '2617', '2618', '2619', '2621', '2623', '2624', '2625', '2627', '2628', + '2629', '2630', '2631', '2632', '2633', '2636', '2637', '2638', '2640', '2641', '2642', '2644', '2645', + '2646', '2650', '2653', '2656', '2658', '2667', '2672', '2673', '2676', '2677', '2679', '2680', '2681', '2683', '2684', '2685', '2686', '2690', '2691', '2693', '2695', '2696', '2697', '2698', '2700', '2701', '2701', '2702', '2703', '2704', '2706', '2707', '2708', '2710', '2711', '2713', '2714', '2716', '2717', '2719', '2720', '2721', '2722', '2724', '2725', '2727', '2728', '2729', '2730', '2731', '2732', '2733', '2736', '2737', '2739', '2740', '2741', '2745', '2751', '2753', '2754', '2755', '2756', '2758', '2759', - '2760', '2762', '2763', '2764', '2765', '2767', '2768', '2769', '2771', '2772', '2775', '2776', '2781', - '2782', '2783', '2784', '2787', '2788', '2789', '2790', '2792', '2794', '2795', '2796', '2797', '2798', - '2799', '2800', '2801', '2802', '2803', '2805', '2806', '2807', '2808', '2809', '2810', '2816', '2817', + '2760', '2762', '2763', '2764', '2765', '2767', '2768', '2769', '2771', '2772', '2775', '2776', '2781', + '2782', '2783', '2784', '2787', '2788', '2789', '2790', '2792', '2794', '2795', '2796', '2797', '2798', + '2799', '2800', '2801', '2802', '2803', '2805', '2806', '2807', '2808', '2809', '2810', '2816', '2817', '2819', '2820', '2821', '2822', '2824', '2825', '9987', '9995', '9996', '9997', '2812', '2718', '2715' ); /* Update the names of several existing UK counties */ @@ -153,7 +153,7 @@ SELECT @domain_id := min(id) FROM civicrm_domain; SELECT @nav_contrbutionID := id FROM civicrm_navigation WHERE name = 'Contributions'; SELECT @nav_contribution_wt := max(weight) from civicrm_navigation WHERE parent_id = @nav_contrbutionID; - + UPDATE civicrm_navigation SET has_separator = 1 WHERE civicrm_navigation.parent_id= @nav_contrbutionID AND civicrm_navigation.weight = @nav_contribution_wt; @@ -163,11 +163,11 @@ VALUES ( @domain_id, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql"}New Price Set{/ts}', 'New Price Set', 'access CiviContribute,administer CiviCRM', 'AND', @nav_contrbutionID, '1', NULL, @nav_contribution_wt+1 ), ( @domain_id, 'civicrm/admin/price&reset=1', '{ts escape="sql"}Manage Price Sets{/ts}', 'Manage Price Sets', 'access CiviContribute,administer CiviCRM', 'AND', @nav_contrbutionID, '1', NULL, @nav_contribution_wt+2 ); - - + + SELECT @nav_contrbutionID_admin := id FROM civicrm_navigation WHERE name = 'CiviContribute'; SELECT @nav_contribution_wt_admin := max(weight) from civicrm_navigation WHERE parent_id = @nav_contrbutionID_admin; - + UPDATE civicrm_navigation SET has_separator = 1 WHERE civicrm_navigation.parent_id= @nav_contrbutionID_admin AND civicrm_navigation.weight = @nav_contribution_wt_admin; @@ -177,55 +177,55 @@ VALUES ( @domain_id, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql"}New Price Set{/ts}', 'New Price Set', 'access CiviContribute,administer CiviCRM', 'AND', @nav_contrbutionID_admin, '1', NULL, @nav_contribution_wt_admin+1 ), ( @domain_id, 'civicrm/admin/price&reset=1', '{ts escape="sql"}Manage Price Sets{/ts}', 'Manage Price Sets', 'access CiviContribute,administer CiviCRM', 'AND', @nav_contrbutionID_admin, '1', NULL, @nav_contribution_wt_admin+2 ); - - + + SELECT @nav_customize_admin := id FROM civicrm_navigation WHERE name = 'Customize'; SELECT @nav_customize_wt_admin := max(weight) from civicrm_navigation WHERE parent_id = @nav_customize_admin; INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) - VALUES + VALUES ( @domain_id, 'civicrm/admin/price&reset=1', '{ts escape="sql"}Price Sets{/ts}', 'Price Sets', 'administer CiviCRM', '', @nav_customize_admin, '1', NULL, @nav_customize_wt_admin+1 ); - + UPDATE civicrm_navigation SET url = 'civicrm/admin/price&reset=1' WHERE civicrm_navigation.url = 'civicrm/event/price&reset=1'; - + CREATE TABLE civicrm_acl_contact_cache ( id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key', user_id int unsigned COMMENT 'FK to civicrm_contact (could be null for anon user)', contact_id int unsigned NOT NULL COMMENT 'FK to civicrm_contact', - operation enum('All', 'View', 'Edit', 'Create', 'Delete', 'Grant', 'Revoke') NOT NULL COMMENT 'What operation does this user have permission on?' + operation enum('All', 'View', 'Edit', 'Create', 'Delete', 'Grant', 'Revoke') NOT NULL COMMENT 'What operation does this user have permission on?' , PRIMARY KEY ( id ) , - UNIQUE INDEX UI_user_contact_operation(user_id, contact_id, operation ) , - CONSTRAINT FK_civicrm_acl_contact_cache_user_id FOREIGN KEY (user_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, - CONSTRAINT FK_civicrm_acl_contact_cache_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE + UNIQUE INDEX UI_user_contact_operation(user_id, contact_id, operation ) , + CONSTRAINT FK_civicrm_acl_contact_cache_user_id FOREIGN KEY (user_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, + CONSTRAINT FK_civicrm_acl_contact_cache_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; - + -- CRM-4690 INSERT INTO civicrm_payment_processor_type ( name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur, payment_type) VALUES ( 'Realex', 'Realex Payment', NULL, 1, 0, 'Merchant ID', 'Password', NULL, 'Account', 'Payment_Realex', 'https://epage.payandshop.com/epage.cgi', NULL, NULL, NULL, 'https://epage.payandshop.com/epage-remote.cgi', NULL, NULL, NULL, 1, 0, 1); - + -- CRM-4802 UPDATE civicrm_payment_processor_type SET url_recur_default = 'https://www.paypal.com/', url_recur_test_default = 'https://www.sandbox.paypal.com/', is_recur = 1 WHERE name = 'PayPal'; - + UPDATE civicrm_payment_processor SET is_recur = 1, url_recur = 'https://www.paypal.com/' WHERE payment_processor_type = 'PayPal' AND is_test = 0; - + UPDATE civicrm_payment_processor SET is_recur = 1, url_recur = 'https://www.sandbox.paypal.com/' WHERE payment_processor_type = 'PayPal' AND is_test = 1; - --- CRM-5313 + +-- CRM-5313 -- migrate the contribution id's to participant id's in lineitem table UPDATE civicrm_line_item AS li LEFT JOIN civicrm_participant_payment AS pp ON (pp.contribution_id = li.entity_id) @@ -234,42 +234,42 @@ WHERE pp.contribution_id = li.entity_id AND li.entity_table = 'civicrm_contribution'; --- CRM-5317 +-- CRM-5317 -- copy name to value, since we want to use value instead of name. UPDATE civicrm_option_value as vals LEFT JOIN civicrm_option_group as groups ON ( groups.id = vals.option_group_id ) - INNER JOIN civicrm_price_field fields ON ( groups.name = CONCAT( 'civicrm_price_field.amount.', fields.id ) ) + INNER JOIN civicrm_price_field fields ON ( groups.name = CONCAT( 'civicrm_price_field.amount.', fields.id ) ) SET vals.value=vals.name; - --- CRM-5244 + +-- CRM-5244 ALTER TABLE civicrm_mail_settings ADD `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this match entry for' AFTER id; UPDATE civicrm_mail_settings SET domain_id = @domain_id; --- Date migration CRM-4312 +-- Date migration CRM-4312 ALTER TABLE civicrm_custom_field - CHANGE date_parts date_format VARCHAR( 64 ) NULL DEFAULT NULL COMMENT 'date format for custom date', + CHANGE date_parts date_format VARCHAR( 64 ) NULL DEFAULT NULL COMMENT 'date format for custom date', ADD time_format int unsigned COMMENT 'time format for custom date' AFTER date_format; - ALTER TABLE `civicrm_preferences_date` + ALTER TABLE `civicrm_preferences_date` CHANGE `format` `date_format` VARCHAR( 64 ) NULL DEFAULT NULL COMMENT 'The date type', ADD `time_format` VARCHAR( 64 ) NULL DEFAULT NULL COMMENT 'store time format' AFTER `date_format`; ALTER TABLE `civicrm_preferences_date` DROP `minute_increment`; - + DELETE FROM civicrm_preferences_date WHERE name IN ('datetime','duration','fixed','manual' ); - + UPDATE civicrm_preferences_date SET date_format = '' WHERE name IN ( 'activityDate', 'activityDatetime', 'birth', 'custom', 'mailing', 'relative' ); - + UPDATE civicrm_preferences_date SET name = 'searchDate' WHERE name = 'relative'; UPDATE civicrm_preferences_date SET name = 'activityDateTime' WHERE name = 'activityDatetime'; UPDATE civicrm_preferences_date SET time_format = 1 WHERE name = 'activityDatetime'; --- CRM-5263 +-- CRM-5263 ALTER TABLE civicrm_country - ADD is_province_abbreviated tinyint(4) default '0' COMMENT 'Should state/province be displayed as abbreviation for contacts from this country?'; + ADD is_province_abbreviated tinyint(4) default '0' COMMENT 'Should state/province be displayed as abbreviation for contacts from this country?'; -- message templates, CRM-3507 ALTER TABLE civicrm_msg_template diff --git a/CRM/Upgrade/Incremental/sql/3.1.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.alpha2.mysql.tpl index 3fe9af4bc5..d8450cdd6e 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.alpha2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.alpha2.mysql.tpl @@ -3,7 +3,7 @@ -- CRM-5263 -UPDATE civicrm_country SET is_province_abbreviated = 1 +UPDATE civicrm_country SET is_province_abbreviated = 1 WHERE name IN ('Canada', 'United States'); -- CRM-5106 @@ -14,7 +14,7 @@ SELECT @option_group_id_acsOpt := max(id) from civicrm_option_group where name = DELETE FROM `civicrm_option_value` WHERE option_group_id = @option_group_id_acsOpt; INSERT INTO `civicrm_option_value` - (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) + (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_acsOpt, {localize}'Email Address'{/localize} , 2, 'email', NULL, 0, NULL, 2, 0, 0, 1, NULL, NULL), (@option_group_id_acsOpt, {localize}'Phone'{/localize} , 3, 'phone', NULL, 0, NULL, 3, 0, 0, 1, NULL, NULL), diff --git a/CRM/Upgrade/Incremental/sql/3.1.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.beta1.mysql.tpl index 4a498b27f0..4a378b9e37 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.beta1.mysql.tpl @@ -16,13 +16,13 @@ {/if} -- CRM-5435 -ALTER TABLE `civicrm_contribution_soft` +ALTER TABLE `civicrm_contribution_soft` ADD CONSTRAINT `FK_civicrm_contribution_soft_pcp_id` FOREIGN KEY (`pcp_id`) REFERENCES `civicrm_pcp` (`id`) ON DELETE SET NULL; -ALTER TABLE `civicrm_contribution_soft` +ALTER TABLE `civicrm_contribution_soft` CHANGE `pcp_id` `pcp_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_pcp.id'; -ALTER TABLE `civicrm_pcp_block` +ALTER TABLE `civicrm_pcp_block` ADD CONSTRAINT `FK_civicrm_pcp_block_supporter_profile_id` FOREIGN KEY (`supporter_profile_id`) REFERENCES `civicrm_uf_group` (`id`) ON DELETE SET NULL; ALTER TABLE `civicrm_pcp_block` @@ -45,30 +45,30 @@ ALTER TABLE `civicrm_pcp_block` -- CRM-5333 -- Delete duplicate records in target and assignment exists if any -DELETE cat.* FROM civicrm_activity_target cat - INNER JOIN ( SELECT id, activity_id, target_contact_id - FROM civicrm_activity_target - GROUP BY activity_id, target_contact_id HAVING count(*) > 1 ) dup_cat - ON ( cat.activity_id = dup_cat.activity_id - AND cat.target_contact_id = dup_cat.target_contact_id +DELETE cat.* FROM civicrm_activity_target cat + INNER JOIN ( SELECT id, activity_id, target_contact_id + FROM civicrm_activity_target + GROUP BY activity_id, target_contact_id HAVING count(*) > 1 ) dup_cat + ON ( cat.activity_id = dup_cat.activity_id + AND cat.target_contact_id = dup_cat.target_contact_id AND cat.id <> dup_cat.id ); -DELETE caa.* FROM civicrm_activity_assignment caa - INNER JOIN ( SELECT id, activity_id, assignee_contact_id - FROM civicrm_activity_assignment - GROUP BY activity_id, assignee_contact_id HAVING count(*) > 1 ) dup_caa - ON ( caa.activity_id = dup_caa.activity_id - AND caa.assignee_contact_id = dup_caa.assignee_contact_id +DELETE caa.* FROM civicrm_activity_assignment caa + INNER JOIN ( SELECT id, activity_id, assignee_contact_id + FROM civicrm_activity_assignment + GROUP BY activity_id, assignee_contact_id HAVING count(*) > 1 ) dup_caa + ON ( caa.activity_id = dup_caa.activity_id + AND caa.assignee_contact_id = dup_caa.assignee_contact_id AND caa.id <> dup_caa.id ); -- Drop unique indexes of activity_target and activity_assignment -ALTER TABLE civicrm_activity_assignment +ALTER TABLE civicrm_activity_assignment DROP INDEX `UI_activity_assignee_contact_id` , ADD UNIQUE INDEX `UI_activity_assignee_contact_id` (`assignee_contact_id`,`activity_id`); -ALTER TABLE civicrm_activity_target +ALTER TABLE civicrm_activity_target DROP INDEX `UI_activity_target_contact_id` , ADD UNIQUE INDEX `UI_activity_target_contact_id` (`target_contact_id`,`activity_id`); diff --git a/CRM/Upgrade/Incremental/sql/3.1.beta2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.beta2.mysql.tpl index 4872c68894..a3d93890f0 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.beta2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.beta2.mysql.tpl @@ -4,8 +4,8 @@ -- CRM-5496 SELECT @option_group_id_report := max(id) from civicrm_option_group where name = 'report_template'; SELECT @caseCompId := max(id) FROM civicrm_component where name = 'CiviCase'; - INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) + INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_report , {localize}'Case Summary Report'{/localize} , 'case/summary' , 'CRM_Report_Form_Case_Summary' , NULL, 0, NULL, 24, {localize}'Provides a summary of cases and their duration by date range, status, staff member and / or case role.'{/localize} , 0, 0, 1, @caseCompId, NULL), (@option_group_id_report , {localize}'Case Time Spent Report'{/localize} , 'case/timespent' , 'CRM_Report_Form_Case_TimeSpent' , NULL, 0, NULL, 25, {localize}'Aggregates time spent on case and / or or non-case activities by activity type and contact.'{/localize} , 0, 0, 1, @caseCompId, NULL), @@ -15,13 +15,13 @@ UPDATE civicrm_navigation SET permission ='access CiviCRM', permission_operator ='' WHERE civicrm_navigation.name= 'Manage Groups'; -- CRM-5450 - + SELECT @option_group_id_address_options := max(id) from civicrm_option_group where name = 'address_options'; SELECT @adOpt_max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_address_options; SELECT @adOpt_max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val where val.option_group_id = @option_group_id_address_options; -INSERT INTO - civicrm_option_value(`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) +INSERT INTO + civicrm_option_value(`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES(@option_group_id_address_options, {localize}'Street Address Parsing'{/localize}, (SELECT @adOpt_max_val := @adOpt_max_val+1), 'street_address_parsing', NULL, 0, NULL, (SELECT @adOpt_max_wt := @adOpt_max_wt + 1 ), 0, 0, 1, NULL, NULL); --fix broken default address options. @@ -29,18 +29,18 @@ SELECT @domain_id := min(id) FROM civicrm_domain; UPDATE `civicrm_preferences` SET `address_options` = REPLACE( `address_options`, '1314', '' ) - WHERE `domain_id` = @domain_id + WHERE `domain_id` = @domain_id AND `contact_id` IS NULL; -- CRM-5528 SELECT @option_group_id_cdt := max(id) from civicrm_option_group where name = 'custom_data_type'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`) VALUES(@option_group_id_cdt, {localize}'Participant Event Type'{/localize}, '3', 'ParticipantEventType', NULL, 0, NULL, 3, 0, 0, 1); --- add table dashboard and dashboard contact +-- add table dashboard and dashboard contact -- CRM-5423 CREATE TABLE civicrm_dashboard ( @@ -61,8 +61,8 @@ VALUES(@option_group_id_cdt, {localize}'Participant Event Type'{/localize}, '3', KEY `FK_civicrm_dashboard_domain_id` (`domain_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - INSERT INTO civicrm_dashboard - ( domain_id, {localize field='label'}`label`{/localize}, url, content, permission, permission_operator, column_no, is_minimized, is_fullscreen, is_active, weight, created_date ) + INSERT INTO civicrm_dashboard + ( domain_id, {localize field='label'}`label`{/localize}, url, content, permission, permission_operator, column_no, is_minimized, is_fullscreen, is_active, weight, created_date ) VALUES ( @domain_id, {localize }'Activities'{/localize}, 'civicrm/dashlet/activity&reset=1&snippet=4', NULL, NULL, NULL, 0, 0,'1', '1', NULL, NULL ); diff --git a/CRM/Upgrade/Incremental/sql/3.1.beta4.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.beta4.mysql.tpl index 1de1d0cff4..8dccaa0527 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.beta4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.beta4.mysql.tpl @@ -2,7 +2,7 @@ -- Set default participant role filter = 1, CRM-4924 UPDATE civicrm_option_value val -LEFT JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) +LEFT JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) SET val.filter = 1 WHERE gr.name = 'participant_role' AND val.name IN ( 'Attendee', 'Host', 'Speaker', 'Volunteer' ); diff --git a/CRM/Upgrade/Incremental/sql/3.1.beta5.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.1.beta5.mysql.tpl index 60c9712339..03231ab821 100644 --- a/CRM/Upgrade/Incremental/sql/3.1.beta5.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.1.beta5.mysql.tpl @@ -8,7 +8,7 @@ INSERT INTO civicrm_state_province ( country_id, abbreviation, name ) VALUES ( @country_id, 'ND', 'Nord' ); UPDATE civicrm_state_province state -INNER JOIN civicrm_country country ON ( country.id = state.country_id ) +INNER JOIN civicrm_country country ON ( country.id = state.country_id ) SET state.name = 'Nord-Est' WHERE state.name = 'Nord-Eat' AND country.name = 'Haiti'; @@ -27,6 +27,6 @@ SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value o SELECT @max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val WHERE val.option_group_id = @option_group_id_mt; INSERT INTO civicrm_option_value - (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`) + (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`) VALUES (@option_group_id_mt, {localize}'Export Grant'{/localize}, (SELECT @max_val := @max_val+1), 'Export Grant', NULL, 0, 0, (SELECT @max_wt := @max_wt+1), 0, 1, 1); \ No newline at end of file diff --git a/CRM/Upgrade/Incremental/sql/3.2.1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.1.mysql.tpl index 291534b83e..8c4b67b167 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.1.mysql.tpl @@ -17,7 +17,7 @@ SELECT @nav_fmdc := id FROM civicrm_navigation WHERE name = 'Find and Merge Dup SELECT @nav_c := id FROM civicrm_navigation WHERE name = 'Contacts'; SELECT @nav_c_wt := max(weight) from civicrm_navigation WHERE parent_id = @nav_c; -DELETE FROM civicrm_navigation WHERE id = @nav_fmdc; +DELETE FROM civicrm_navigation WHERE id = @nav_fmdc; UPDATE civicrm_navigation SET has_separator = '1' where id = @nav_mt; diff --git a/CRM/Upgrade/Incremental/sql/3.2.2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.2.mysql.tpl index 90ca76c045..d822ae2294 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.2.mysql.tpl @@ -19,15 +19,15 @@ SELECT @eventCompId := max(id) FROM civicrm_component where name = 'CiviEven SELECT @max_weight := MAX(ROUND(weight)) from civicrm_option_value WHERE option_group_id = @ogrID; INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) VALUES (@ogrID , {localize}'{ts escape="sql"}Grant Report{/ts}'{/localize}, 'grant', 'CRM_Report_Form_Grant', NULL, 0, 0, @max_weight+1, {localize}'{ts escape="sql"}Grant Report{/ts}'{/localize}, 0, 0, 1, @grantCompId, NULL), (@ogrID, {localize}'{ts escape="sql"}Participant list Count Report{/ts}'{/localize}, 'event/participantlist', 'CRM_Report_Form_Event_ParticipantListCount', NULL, 0, 0, @max_weight+2, {localize}'{ts escape="sql"}Shows the Participant list with Participant Count.{/ts}'{/localize}, 0, 0, 1, @eventCompId, NULL), (@ogrID, {localize}'{ts escape="sql"}Income Count Summary Report{/ts}'{/localize}, 'event/incomesummary', 'CRM_Report_Form_Event_IncomeCountSummary', NULL, 0, 0, @max_weight+3, {localize}'{ts escape="sql"}Shows the Income Summary of events with Count.{/ts}'{/localize}, 0, 0, 1, @eventCompId, NULL); - + INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( @domainID, 'Grant Report', 'grant', 'Grant Report', 'access CiviGrant', '{literal}a:30:{s:6:"fields";a:2:{s:12:"display_name";s:1:"1";s:25:"application_received_date";s:1:"1";}s:15:"display_name_op";s:3:"has";s:18:"display_name_value";s:0:"";s:13:"grant_type_op";s:2:"in";s:16:"grant_type_value";a:0:{}s:15:"grant_status_op";s:2:"in";s:18:"grant_status_value";a:0:{}s:18:"amount_granted_min";s:0:"";s:18:"amount_granted_max";s:0:"";s:17:"amount_granted_op";s:3:"lte";s:20:"amount_granted_value";s:0:"";s:20:"amount_requested_min";s:0:"";s:20:"amount_requested_max";s:0:"";s:19:"amount_requested_op";s:3:"lte";s:22:"amount_requested_value";s:0:"";s:34:"application_received_date_relative";s:1:"0";s:30:"application_received_date_from";s:0:"";s:28:"application_received_date_to";s:0:"";s:28:"money_transfer_date_relative";s:1:"0";s:24:"money_transfer_date_from";s:0:"";s:22:"money_transfer_date_to";s:0:"";s:23:"grant_due_date_relative";s:1:"0";s:19:"grant_due_date_from";s:0:"";s:17:"grant_due_date_to";s:0:"";s:11:"description";s:12:"Grant Report";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:16:"access CiviGrant";s:9:"domain_id";i:1;}{/literal}'); SET @instanceID:=LAST_INSERT_ID(); diff --git a/CRM/Upgrade/Incremental/sql/3.2.3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.3.mysql.tpl index c1775e2084..e7c03f4bf6 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.3.mysql.tpl @@ -8,7 +8,7 @@ INSERT INTO civicrm_navigation VALUES ( @domainID, '{ts escape="sql"}Home{/ts}', 'Home', 'civicrm/dashboard&reset=1', NULL, '', NULL, 1, NULL, 0), ( @domainID, '{ts escape="sql"}Website Types{/ts}', 'Website Types', 'civicrm/admin/options/website_type&group=website_type&reset=1', 'administer CiviCRM', '', @navid, 1, NULL, @wt + 1); - + -- CRM-6726 UPDATE civicrm_option_value SET filter = 0 WHERE civicrm_option_value.name = 'Print PDF Letter'; @@ -16,15 +16,15 @@ VALUES UPDATE civicrm_report_instance SET form_values = '{literal}a:37:{s:6:"fields";a:2:{s:12:"display_name";s:1:"1";s:25:"application_received_date";s:1:"1";}s:15:"display_name_op";s:3:"has";s:18:"display_name_value";s:0:"";s:12:"gender_id_op";s:2:"in";s:15:"gender_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"grant_type_op";s:2:"in";s:16:"grant_type_value";a:0:{}s:12:"status_id_op";s:2:"in";s:15:"status_id_value";a:0:{}s:18:"amount_granted_min";s:0:"";s:18:"amount_granted_max";s:0:"";s:17:"amount_granted_op";s:3:"lte";s:20:"amount_granted_value";s:0:"";s:20:"amount_requested_min";s:0:"";s:20:"amount_requested_max";s:0:"";s:19:"amount_requested_op";s:3:"lte";s:22:"amount_requested_value";s:0:"";s:34:"application_received_date_relative";s:1:"0";s:30:"application_received_date_from";s:0:"";s:28:"application_received_date_to";s:0:"";s:28:"money_transfer_date_relative";s:1:"0";s:24:"money_transfer_date_from";s:0:"";s:22:"money_transfer_date_to";s:0:"";s:23:"grant_due_date_relative";s:1:"0";s:19:"grant_due_date_from";s:0:"";s:17:"grant_due_date_to";s:0:"";s:11:"description";s:12:"Grant Report";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:16:"access CiviGrant";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}{/literal}' WHERE report_id = 'grant'; -- CRM-6663 -ALTER TABLE `civicrm_pledge_payment` +ALTER TABLE `civicrm_pledge_payment` ADD `actual_amount` decimal(20,2) DEFAULT NULL COMMENT 'Actual amount that is paid as the Pledged installment amount.' AFTER `scheduled_amount`; UPDATE `civicrm_pledge_payment` SET actual_amount = scheduled_amount WHERE contribution_id IS NOT NULL; -ALTER TABLE `civicrm_pledge` +ALTER TABLE `civicrm_pledge` ADD `original_installment_amount` decimal(20,2) NOT NULL COMMENT 'Original amount for each of the installments.' AFTER `amount`; UPDATE `civicrm_pledge` SET `original_installment_amount` = `amount` / `installments`; --CRM-6757 -UPDATE `civicrm_option_value` +UPDATE `civicrm_option_value` SET {localize field='label'}label = name{/localize} WHERE name IN ('day','month','week','year'); diff --git a/CRM/Upgrade/Incremental/sql/3.2.4.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.4.mysql.tpl index 37725f822a..0117d0bcfc 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.4.mysql.tpl @@ -4,8 +4,8 @@ SELECT @activity_type_max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val where val.option_group_id = @option_group_id_act; UPDATE civicrm_option_value val - SET val.value = @activity_type_max_val+1, + SET val.value = @activity_type_max_val+1, val.weight = @activity_type_max_wt+1 - WHERE val.option_group_id = @option_group_id_act + WHERE val.option_group_id = @option_group_id_act AND val.name = 'Print PDF Letter'; diff --git a/CRM/Upgrade/Incremental/sql/3.2.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.alpha1.mysql.tpl index 56acaaa8bf..8b82805798 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.alpha1.mysql.tpl @@ -1,12 +1,12 @@ -- CRM-5536, CRM-5535 -INSERT INTO civicrm_payment_processor_type -( name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur, payment_type) +INSERT INTO civicrm_payment_processor_type +( name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur, payment_type) VALUES ( 'PayflowPro', '{ts escape="sql"}PayflowPro{/ts}', NULL, 1, 0, 'Vendor ID', 'Password', 'Partner (merchant)', 'User', 'Payment_PayflowPro', 'https://Payflowpro.paypal.com', NULL, NULL, NULL, 'https://pilot-Payflowpro.paypal.com', NULL, NULL, NULL, 1, 0, 1), ( 'FirstData', '{ts escape="sql"}FirstData (aka linkpoint){/ts}', '{ts escape="sql"}FirstData (aka linkpoint){/ts}', 1, 0, 'Store Name', 'Certificate Path', NULL, NULL, 'Payment_FirstData', 'https://secure.linkpt.net', NULL, NULL, NULL, 'https://staging.linkpt.net', NULL, NULL, NULL, 1, NULL, 1); --- CRM-5461 +-- CRM-5461 SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type'; SELECT @activity_type_max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_act; SELECT @activity_type_max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val where val.option_group_id = @option_group_id_act; @@ -30,34 +30,34 @@ SELECT @atOpt_max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val wh SELECT @caseCompId := max(id) FROM civicrm_component where name = 'CiviCase'; -INSERT INTO - civicrm_option_value(`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) -VALUES(@option_group_id_activity_type, {localize}'Merge Case'{/localize}, (SELECT @atOpt_max_val := @atOpt_max_val+1), 'Merge Case', NULL, 0, NULL, (SELECT @atOpt_max_wt := @atOpt_max_wt + 1 ), 0, 1, 1, @caseCompId, NULL ), +INSERT INTO + civicrm_option_value(`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) +VALUES(@option_group_id_activity_type, {localize}'Merge Case'{/localize}, (SELECT @atOpt_max_val := @atOpt_max_val+1), 'Merge Case', NULL, 0, NULL, (SELECT @atOpt_max_wt := @atOpt_max_wt + 1 ), 0, 1, 1, @caseCompId, NULL ), (@option_group_id_activity_type, {localize}'Reassigned Case'{/localize}, (SELECT @atOpt_max_val := @atOpt_max_val+1), 'Reassigned Case', NULL, 0, NULL, (SELECT @atOpt_max_wt := @atOpt_max_wt + 1 ), 0, 1, 1, @caseCompId, NULL ), (@option_group_id_activity_type, {localize}'Link Cases'{/localize}, (SELECT @atOpt_max_val := @atOpt_max_val+1), 'Link Cases', NULL, 0, NULL, (SELECT @atOpt_max_wt := @atOpt_max_wt + 1 ), 0, 1, 1, @caseCompId, NULL ); - + -- CRM-5752 - UPDATE civicrm_option_value val - LEFT JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) + UPDATE civicrm_option_value val + LEFT JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) SET val.is_reserved = 1 WHERE gr.name = 'contribution_status' AND val.name IN ( 'Completed', 'Pending', 'Cancelled', 'Failed', 'In Progress', 'Overdue' ); -- CRM-5831 - ALTER TABLE civicrm_email - ADD `signature_text` text COLLATE utf8_unicode_ci COMMENT 'Text formatted signature for the email.', - ADD `signature_html` text COLLATE utf8_unicode_ci COMMENT 'HTML formatted signature for the email.'; + ALTER TABLE civicrm_email + ADD `signature_text` text COLLATE utf8_unicode_ci COMMENT 'Text formatted signature for the email.', + ADD `signature_html` text COLLATE utf8_unicode_ci COMMENT 'HTML formatted signature for the email.'; -- CRM-5787 UPDATE civicrm_option_value val - INNER JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) - SET val.grouping = 'Opened' - WHERE gr.name = 'case_status' AND val.name IN ( 'Open', 'Urgent' ); - + INNER JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) + SET val.grouping = 'Opened' + WHERE gr.name = 'case_status' AND val.name IN ( 'Open', 'Urgent' ); + UPDATE civicrm_option_value val - INNER JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) - SET val.grouping = 'Closed' - WHERE gr.name = 'case_status' AND val.name = 'Closed'; + INNER JOIN civicrm_option_group gr ON ( gr.id = val.option_group_id ) + SET val.grouping = 'Closed' + WHERE gr.name = 'case_status' AND val.name = 'Closed'; SELECT @domain_id := min(id) FROM civicrm_domain; SELECT @nav_case := id FROM civicrm_navigation WHERE name = 'CiviCase'; @@ -66,7 +66,7 @@ VALUES(@option_group_id_activity_type, {localize}'Merge Case'{/localize}, (SELEC INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( @domain_id, 'civicrm/admin/options/case_status&group=case_status&reset=1', '{ts escape="sql"}Case Statuses{/ts}','Case Statuses', 'administer CiviCase', NULL, @nav_case, '1', NULL, @nav_case_weight+1 ); + ( @domain_id, 'civicrm/admin/options/case_status&group=case_status&reset=1', '{ts escape="sql"}Case Statuses{/ts}','Case Statuses', 'administer CiviCase', NULL, @nav_case, '1', NULL, @nav_case_weight+1 ); -- CRM-5766 ALTER TABLE civicrm_price_field @@ -75,7 +75,7 @@ VALUES(@option_group_id_activity_type, {localize}'Merge Case'{/localize}, (SELEC -- CRM-5612 ALTER TABLE civicrm_cache MODIFY path varchar(255) COMMENT 'Unique path name for cache element'; - + -- CRM-5874 ALTER TABLE civicrm_uf_group ADD `is_proximity_search` tinyint(4) unsigned default 0 COMMENT 'Should proximity search be included in profile search form?'; @@ -87,7 +87,7 @@ VALUES(@option_group_id_activity_type, {localize}'Merge Case'{/localize}, (SELEC ALTER TABLE civicrm_line_item ADD `participant_count` int(10) unsigned default NULL COMMENT 'Number of Participants Per field.'; - + -- CRM-5970 -- civicrm_entity_financial_trxn CREATE TABLE `civicrm_entity_financial_trxn` ( @@ -111,7 +111,7 @@ VALUES(@option_group_id_activity_type, {localize}'Merge Case'{/localize}, (SELEC -- Constraints for table `civicrm_entity_financial_trxn` ALTER TABLE `civicrm_entity_financial_trxn` ADD CONSTRAINT `FK_civicrm_entity_financial_trxn_financial_trxn_id` FOREIGN KEY (`financial_trxn_id`) REFERENCES `civicrm_financial_trxn` (`id`) ON DELETE SET NULL; - + -- Insert financial_trxn_id.contribution_id values into new rows in civicrm_entity_financial_trxn to preserve existing linkages INSERT INTO civicrm_entity_financial_trxn (financial_trxn_id, amount, entity_id, entity_table) SELECT id, total_amount, contribution_id, 'civicrm_contribution' @@ -119,27 +119,27 @@ VALUES(@option_group_id_activity_type, {localize}'Merge Case'{/localize}, (SELEC ON DUPLICATE KEY UPDATE civicrm_entity_financial_trxn.entity_id = ft.contribution_id; -- ALTER civicrm_financial_trxn - ALTER TABLE `civicrm_financial_trxn` + ALTER TABLE `civicrm_financial_trxn` DROP FOREIGN KEY `FK_civicrm_financial_trxn_contribution_id` ; - ALTER TABLE `civicrm_financial_trxn` + ALTER TABLE `civicrm_financial_trxn` DROP `contribution_id`; ALTER TABLE `civicrm_financial_trxn` ADD `from_account_id` INT( 10 ) unsigned NULL, ADD `to_account_id` INT( 10 ) unsigned NULL; ALTER TABLE `civicrm_financial_trxn` - ADD FOREIGN KEY `FK_civicrm_financial_trxn_from_account_id` ( `from_account_id` ) REFERENCES `civicrm_financial_account` (`id`) , + ADD FOREIGN KEY `FK_civicrm_financial_trxn_from_account_id` ( `from_account_id` ) REFERENCES `civicrm_financial_account` (`id`) , ADD FOREIGN KEY `FK_civicrm_financial_trxn_to_account_id` (`to_account_id`) REFERENCES `civicrm_financial_account`(`id`); - + -- INSERT civicrm_option_group - INSERT INTO - `civicrm_option_group` (`name`, {localize field='description'}`description`{/localize} , `is_reserved`, `is_active`) -VALUES + INSERT INTO + `civicrm_option_group` (`name`, {localize field='description'}`description`{/localize} , `is_reserved`, `is_active`) +VALUES ('account_type',{localize}'{ts escape="sql"}Account type{/ts}'{/localize}, 0, 1); - + -- INSERT Account types SELECT @option_group_id_accTp := max(id) from civicrm_option_group where name = 'account_type'; - INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) + INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_accTp, {localize}'{ts escape="sql"}Asset{/ts}'{/localize}, 1, 'Asset', NULL, 0, NULL, 1,{localize} NULL{/localize} , 0, 0, 1, NULL, NULL), (@option_group_id_accTp,{localize}'{ts escape="sql"}Liability{/ts}'{/localize}, 2, 'Liability', NULL, 0, NULL, 1,{localize} NULL{/localize} , 0, 0, 1, NULL, NULL), @@ -148,17 +148,17 @@ VALUES -- CRM-5883 --- add table civicrm_website +-- add table civicrm_website CREATE TABLE civicrm_website ( id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Website Id.', contact_id int unsigned NULL DEFAULT NULL COMMENT 'FK To Contact ID.', url varchar(128) NULL DEFAULT NULL COMMENT 'Website.', website_type_id int unsigned NULL DEFAULT NULL COMMENT 'Which Website type does this website belong to.', - PRIMARY KEY ( id ), - INDEX UI_website_type_id( website_type_id ), - CONSTRAINT FK_civicrm_website_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE + PRIMARY KEY ( id ), + INDEX UI_website_type_id( website_type_id ), + CONSTRAINT FK_civicrm_website_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; - + -- insert home_URL and image_URL for already exists contacts INSERT INTO civicrm_website ( contact_id, url, website_type_id ) SELECT cc.id, cc.home_URL, 1 FROM civicrm_contact cc WHERE cc.home_URL IS NOT NULL ; @@ -168,14 +168,14 @@ VALUES -- add option group website_type INSERT INTO civicrm_option_group (name, {localize field='description'}description{/localize}, is_reserved, is_active) - VALUES + VALUES ('website_type', {localize}'Website Type'{/localize} , 0, 1), ('tag_used_for', {localize}'Tag Used For'{/localize}, 0, 1); SELECT @option_group_id_website := max(id) FROM civicrm_option_group WHERE name = 'website_type' ; SELECT @option_group_id_tuf := max(id) FROM civicrm_option_group WHERE name = 'tag_used_for' ; - + INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize} , is_optgroup, is_reserved, is_active, component_id, visibility_id) + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize} , is_optgroup, is_reserved, is_active, component_id, visibility_id) VALUES (@option_group_id_website, {localize}'Home' {/localize}, 1, 'Home', NULL, 0, NULL, 1,{localize} NULL{/localize}, 0, 0, 1, NULL, NULL), (@option_group_id_website, {localize}'Work'{/localize}, 2, 'Work', NULL, 0, NULL, 2, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL), @@ -183,26 +183,26 @@ VALUES (@option_group_id_website, {localize}'Twitter'{/localize}, 4, 'Twitter', NULL, 0, NULL, 4,{localize}NULL{/localize}, 0, 0, 1, NULL, NULL), (@option_group_id_website, {localize}'MySpace'{/localize}, 5, 'MySpace', NULL, 0, NULL, 5, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL), (@option_group_id_tuf, {localize}'Contacts'{/localize}, 'civicrm_contact', 'Contacts', NULL, 0, NULL, 1,{localize}NULL{/localize}, 0, 0, 1, NULL, NULL), - (@option_group_id_tuf, {localize}'Activities'{/localize}, 'civicrm_activity', 'Activities', NULL, 0, NULL, 2,{localize}NULL{/localize}, 0, 0, 1, NULL, NULL), + (@option_group_id_tuf, {localize}'Activities'{/localize}, 'civicrm_activity', 'Activities', NULL, 0, NULL, 2,{localize}NULL{/localize}, 0, 0, 1, NULL, NULL), (@option_group_id_tuf, {localize}'Cases'{/localize}, 'civicrm_case', 'Cases', NULL, 0, NULL, 3,{localize}NULL{/localize}, 0, 0, 1, NULL, NULL); - + -- CRM-5962 -- add columns entity_table , entity_id in civicrm_entity_tag - ALTER TABLE civicrm_entity_tag + ALTER TABLE civicrm_entity_tag ADD entity_table varchar(64) NULL DEFAULT NULL COMMENT 'physical tablename for entity being joined to file, e.g. civicrm_contact' AFTER id, DROP FOREIGN KEY FK_civicrm_entity_tag_contact_id, DROP INDEX UI_contact_id_tag_id, CHANGE contact_id entity_id int unsigned NOT NULL COMMENT 'FK to entity table specified in entity_table column.', ADD INDEX index_entity (entity_table, entity_id) ; -- entity_table field for exists records is civicrm_contact - UPDATE civicrm_entity_tag + UPDATE civicrm_entity_tag SET entity_table ='civicrm_contact' ; -- add is_reserved, is_hidden, used_for in civicrm_tag - ALTER TABLE civicrm_tag - ADD is_reserved tinyint DEFAULT 0, - ADD is_hidden tinyint DEFAULT 0, + ALTER TABLE civicrm_tag + ADD is_reserved tinyint DEFAULT 0, + ADD is_hidden tinyint DEFAULT 0, ADD used_for varchar(64) NULL DEFAULT NULL; UPDATE civicrm_tag @@ -214,16 +214,16 @@ VALUES SELECT @max_wt := max(weight) from civicrm_option_value where option_group_id=@option_group_id_activity_type; SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase'; INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,is_reserved, is_active, component_id ) -VALUES + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,is_reserved, is_active, component_id ) +VALUES ( @option_group_id_activity_type,{localize}'Change Case Tags'{/localize},(SELECT @max_val := @max_val+1),'Change Case Tags','NULL',0,0,(SELECT @max_wt := @max_wt+1),1,1,@caseCompId); {include file='../CRM/Upgrade/3.2.alpha1.msg_template/civicrm_msg_template.tpl'} -- CRM-6024 UPDATE civicrm_participant_status_type - SET is_counted = 0 - WHERE name = 'Pending from incomplete transaction'; + SET is_counted = 0 + WHERE name = 'Pending from incomplete transaction'; -- CRM-6004 ALTER TABLE civicrm_uf_field @@ -243,7 +243,7 @@ INSERT INTO civicrm_mailing_bounce_pattern (@bounceTypeID, 'not connected'); -- CRM-6045 -UPDATE civicrm_payment_processor_type +UPDATE civicrm_payment_processor_type SET url_site_test_default = 'https://www.payjunctionlabs.com/quick_link' WHERE name = 'PayJunction'; -- CRM-5803 @@ -252,22 +252,22 @@ SET url_site_test_default = 'https://www.payjunctionlabs.com/quick_link' WHERE n SELECT @nav_max_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_search; SELECT @nav_find_pledge_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_search AND has_separator = 1; SELECT @pledge_id := id from civicrm_navigation WHERE parent_id = @nav_search AND weight = @nav_find_pledge_weight; - + UPDATE civicrm_navigation SET has_separator = NULL WHERE id = @pledge_id LIMIT 1; UPDATE civicrm_navigation SET weight = @nav_max_weight+1 WHERE parent_id = @nav_search AND weight = @nav_max_weight; - + INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( @domain_id, 'civicrm/activity/search&reset=1', '{ts escape="sql"}Find Activities{/ts}','Find Activities', NULL, + ( @domain_id, 'civicrm/activity/search&reset=1', '{ts escape="sql"}Find Activities{/ts}','Find Activities', NULL, '', @nav_search, '1', 1, @nav_find_pledge_weight ); - + SELECT @option_group_id_mt := max(id) from civicrm_option_group where name = 'mapping_type'; SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_mt; SELECT @max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val WHERE val.option_group_id = @option_group_id_mt; INSERT INTO civicrm_option_value - (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`) + (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`) VALUES (@option_group_id_mt, {localize}'Export Activities'{/localize}, @max_val+1, 'Export Activity', NULL, 0, 0, @max_wt+1, 0, 1, 1); diff --git a/CRM/Upgrade/Incremental/sql/3.2.alpha3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.alpha3.mysql.tpl index 2462b6f4ea..25e33d1a75 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.alpha3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.alpha3.mysql.tpl @@ -3,39 +3,39 @@ {include file='../CRM/Upgrade/3.2.alpha3.msg_template/civicrm_msg_template.tpl'} -- CRM-6144 - UPDATE civicrm_option_value + UPDATE civicrm_option_value LEFT JOIN civicrm_option_group ON ( civicrm_option_value.option_group_id = civicrm_option_group.id ) - SET civicrm_option_value.is_reserved = 1, civicrm_option_value.is_active = 0 - WHERE civicrm_option_group.name = 'activity_type' + SET civicrm_option_value.is_reserved = 1, civicrm_option_value.is_active = 0 + WHERE civicrm_option_group.name = 'activity_type' AND civicrm_option_value.name = 'Close Case'; -- CRM-6102 -ALTER TABLE civicrm_preferences +ALTER TABLE civicrm_preferences ADD sort_name_format TEXT COMMENT 'Format to display contact sort name' AFTER mailing_format, ADD display_name_format TEXT COMMENT 'Format to display the contact display name' AFTER mailing_format; -UPDATE civicrm_preferences - SET display_name_format = '{literal}{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}{/literal}', +UPDATE civicrm_preferences + SET display_name_format = '{literal}{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}{/literal}', sort_name_format = '{literal}{contact.last_name}{, }{contact.first_name}{/literal}' WHERE is_domain = 1; -- CRM-1496 - INSERT INTO - `civicrm_option_group` (`name`, {localize field='description'}`description`{/localize}, `is_reserved`, `is_active`) -VALUES + INSERT INTO + `civicrm_option_group` (`name`, {localize field='description'}`description`{/localize}, `is_reserved`, `is_active`) +VALUES ('currencies_enabled',{localize}'{ts escape="sql"}List of currencies enabled for this site{/ts}'{/localize}, 0, 1); - + -- INSERT Default currency SELECT @option_group_id_currency := max(id) from civicrm_option_group where name = 'currencies_enabled'; - INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) + INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_currency, {localize}'{ts escape="sql"}USD ($){/ts}'{/localize}, 'USD', 'USD', NULL, 0, 1, 1, {localize} NULL{/localize} , 0, 0, 1, NULL, NULL); -- CRM-1496 --- add currency field, set it to default value and modify it to not null +-- add currency field, set it to default value and modify it to not null -- civicrm_contribution_recur ALTER TABLE `civicrm_contribution_recur` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.'; UPDATE `civicrm_contribution_recur` SET `currency` = '{$config->defaultCurrency}'; @@ -82,12 +82,12 @@ VALUES -- CRM-6138 {include file='../CRM/Upgrade/3.2.alpha3.languages/languages.tpl'} -ALTER TABLE `civicrm_contact` - ADD COLUMN `preferred_language` varchar(5) DEFAULT NULL COMMENT 'Which language is preferred for communication. FK to languages in civicrm_option_value.'; +ALTER TABLE `civicrm_contact` + ADD COLUMN `preferred_language` varchar(5) DEFAULT NULL COMMENT 'Which language is preferred for communication. FK to languages in civicrm_option_value.'; -- CRM-3854 -ALTER TABLE `civicrm_country` - ADD COLUMN `address_format_id` int(10) unsigned DEFAULT NULL COMMENT 'Format to display the address, country specific'; +ALTER TABLE `civicrm_country` + ADD COLUMN `address_format_id` int(10) unsigned DEFAULT NULL COMMENT 'Format to display the address, country specific'; CREATE TABLE `civicrm_address_format` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', @@ -97,7 +97,7 @@ CREATE TABLE `civicrm_address_format` ( -- CRM-6154 ALTER TABLE civicrm_domain - ADD `locale_custom_strings` text COLLATE utf8_unicode_ci COMMENT 'String Overrides'; + ADD `locale_custom_strings` text COLLATE utf8_unicode_ci COMMENT 'String Overrides'; -- CRM-6181 UPDATE `civicrm_contact` SET `is_deleted` = 0 WHERE `is_deleted` IS NULL; @@ -118,25 +118,25 @@ INSERT INTO civicrm_state_province ( 'Rum Cay','RC', 1212 ), ( 'San Salvador Island', 'SS', 1212 ), ( 'Kongo central', '01', 1050 ), - ( 'Kwango', '02', 1050 ), - ( 'Kwilu', '03', 1050 ), - ( 'Mai-Ndombe', '04', 1050 ), - ( 'Kasai', '05', 1050 ), - ( 'Lulua', '06', 1050 ), - ( 'Lomami', '07', 1050 ), - ( 'Sankuru', '08', 1050 ), - ( 'Ituri', '09', 1050 ), - ( 'Haut-Uele', '10', 1050 ), - ( 'Tshopo', '11', 1050 ), - ( 'Bas-Uele', '12', 1050 ), - ( 'Nord-Ubangi', '13', 1050 ), - ( 'Mongala', '14', 1050 ), - ( 'Sud-Ubangi', '15', 1050 ), - ( 'Tshuapa', '16', 1050 ), - ( 'Haut-Lomami', '17', 1050 ), - ( 'Lualaba', '18', 1050 ), - ( 'Haut-Katanga', '19', 1050 ), - ( 'Tanganyika', '20', 1050 ); + ( 'Kwango', '02', 1050 ), + ( 'Kwilu', '03', 1050 ), + ( 'Mai-Ndombe', '04', 1050 ), + ( 'Kasai', '05', 1050 ), + ( 'Lulua', '06', 1050 ), + ( 'Lomami', '07', 1050 ), + ( 'Sankuru', '08', 1050 ), + ( 'Ituri', '09', 1050 ), + ( 'Haut-Uele', '10', 1050 ), + ( 'Tshopo', '11', 1050 ), + ( 'Bas-Uele', '12', 1050 ), + ( 'Nord-Ubangi', '13', 1050 ), + ( 'Mongala', '14', 1050 ), + ( 'Sud-Ubangi', '15', 1050 ), + ( 'Tshuapa', '16', 1050 ), + ( 'Haut-Lomami', '17', 1050 ), + ( 'Lualaba', '18', 1050 ), + ( 'Haut-Katanga', '19', 1050 ), + ( 'Tanganyika', '20', 1050 ); -- CRM-6159 UPDATE civicrm_mailing_bounce_pattern SET pattern = 'over\\s?quota' WHERE pattern = 'overs?quota'; diff --git a/CRM/Upgrade/Incremental/sql/3.2.alpha4.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.alpha4.mysql.tpl index 5b31a98664..f0a3ba998a 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.alpha4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.alpha4.mysql.tpl @@ -6,7 +6,7 @@ ALTER TABLE `civicrm_tag` CHANGE `is_hidden` `is_tagset` TINYINT( 4 ) NULL DEFAU ALTER TABLE `civicrm_event` CHANGE `is_template` `is_template` TINYINT( 4 ) NULL DEFAULT '0' COMMENT 'whether the event has template'; UPDATE `civicrm_event` SET `is_template` = 0 WHERE `is_template` IS NULL ; --- CRM-5970 +-- CRM-5970 ALTER TABLE `civicrm_financial_account` ADD `contact_id` INT UNSIGNED NOT NULL COMMENT 'FK to civicrm_contact' AFTER `id` ; ALTER TABLE `civicrm_financial_account` ADD CONSTRAINT `FK_civicrm_financial_account_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE; @@ -28,13 +28,13 @@ SELECT @option_group_id_eventBadge := max(id) from civicrm_option_group {if $multilingual} INSERT INTO civicrm_option_value - (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, weight, is_active, component_id ) + (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, weight, is_active, component_id ) VALUES (@option_group_id_eventBadge , {foreach from=$locales item=locale}'Name Only', 'Simple Event Name Badge', {/foreach} '1', 'CRM_Event_Badge_Simple', 1, 1, NULL ), (@option_group_id_eventBadge , {foreach from=$locales item=locale}'Name Tent', 'Name Tent', {/foreach} '2', 'CRM_Event_Badge_NameTent', 1, 1, NULL ); {else} INSERT INTO civicrm_option_value - (option_group_id, label, description, value, name, weight, is_active, component_id ) + (option_group_id, label, description, value, name, weight, is_active, component_id ) VALUES (@option_group_id_eventBadge , '{ts escape="sql"}Name Only{/ts}', '{ts escape="sql"}Simple Event Name Badge{/ts}', '1', 'CRM_Event_Badge_Simple', 1, 1, NULL ), (@option_group_id_eventBadge , '{ts escape="sql"}Name Tent{/ts}', '{ts escape="sql"}Name Tent{/ts}', '2', 'CRM_Event_Badge_NameTent', 1, 1, NULL ); diff --git a/CRM/Upgrade/Incremental/sql/3.2.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.beta1.mysql.tpl index 0ba00cd22c..6009d1896e 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.beta1.mysql.tpl @@ -5,9 +5,9 @@ INSERT IGNORE INTO civicrm_state_province (id, country_id, abbreviation, name) -- CRM-5938 SELECT @domainID := min(id) FROM civicrm_domain; -INSERT INTO `civicrm_dashboard` - ( `domain_id`, {localize field='label'}`label`{/localize}, `url`, `content`, `permission`, `permission_operator`, `column_no`, `is_minimized`, `is_active`, `weight`, `created_date`, `is_fullscreen`, `is_reserved`) - VALUES +INSERT INTO `civicrm_dashboard` + ( `domain_id`, {localize field='label'}`label`{/localize}, `url`, `content`, `permission`, `permission_operator`, `column_no`, `is_minimized`, `is_active`, `weight`, `created_date`, `is_fullscreen`, `is_reserved`) + VALUES ( @domainID, {localize}'My Cases'{/localize}, 'civicrm/dashlet/myCases&reset=1&snippet=4', NULL, 'access my cases and activities', NULL , 0, 0, 1, 2, NULL, 1, 1), ( @domainID, {localize}'All Cases'{/localize}, 'civicrm/dashlet/allCases&reset=1&snippet=4', NULL, 'access all cases and activities', NULL , 0, 0, 1, 3, NULL, 1, 1); @@ -15,12 +15,12 @@ INSERT INTO `civicrm_dashboard` SELECT @option_group_id_eventBadge := max(id) from civicrm_option_group where name = 'event_badge'; {if $multilingual} INSERT INTO civicrm_option_value - (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, weight, is_active, component_id ) + (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, weight, is_active, component_id ) VALUES (@option_group_id_eventBadge , {foreach from=$locales item=locale}'With Logo', 'You can set your own background image', {/foreach} '3', 'CRM_Event_Badge_Logo', 1, 1, NULL ); {else} INSERT INTO civicrm_option_value - (option_group_id, label, description, value, name, weight, is_active, component_id ) + (option_group_id, label, description, value, name, weight, is_active, component_id ) VALUES (@option_group_id_eventBadge , '{ts escape="sql"}With Logo{/ts}', '{ts escape="sql"}You can set your own background image{/ts}', '3', 'CRM_Event_Badge_Logo', 1, 1, NULL ); {/if} diff --git a/CRM/Upgrade/Incremental/sql/3.2.beta3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.beta3.mysql.tpl index 8cdd5733d0..1a28703c39 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.beta3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.beta3.mysql.tpl @@ -2,34 +2,34 @@ INSERT INTO civicrm_uf_group (name, group_type, {localize field='title'}title{/localize}, is_reserved ) VALUES ('summary_overlay', 'Contact', {localize}'Summary Overlay'{/localize}, 1 ); - + SELECT @uf_group_id_summary := max(id) from civicrm_uf_group where name = 'summary_overlay'; INSERT INTO civicrm_uf_join (is_active,module,entity_table,entity_id,weight,uf_group_id) VALUES (1, 'Profile', NULL, NULL, 6, @uf_group_id_summary ); - + INSERT INTO civicrm_uf_field ( uf_group_id, field_name, is_required, is_reserved, weight, visibility, in_selector, is_searchable, location_type_id, {localize field='label'}label{/localize},field_type ) VALUES - ( @uf_group_id_summary, 'phone' ,1, 0, 1, 'User and User Admin Only', 0, 0, 1, {localize}'Home Phone'{/localize}, 'Contact'), - ( @uf_group_id_summary, 'phone' ,1, 0, 2, 'User and User Admin Only', 0, 0, 2, {localize}'Home Mobile'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'street_address', 1, 0, 3, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Address'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'city', 1, 0, 4, 'User and User Admin Only', 0, 0, NULL, {localize}'City'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'state_province', 1, 0, 5, 'User and User Admin Only', 0, 0, NULL, {localize}'State'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'postal_code', 1, 0, 6, 'User and User Admin Only', 0, 0, NULL, {localize}'Postal Code'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'email', 1, 0, 7, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Email'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'group', 1, 0, 8, 'User and User Admin Only', 0, 0, NULL, {localize}'Groups'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'tag', 1, 0, 9, 'User and User Admin Only', 0, 0, NULL, {localize}'Tags'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'gender', 1, 0, 10, 'User and User Admin Only', 0, 0, NULL, {localize}'Gender'{/localize}, 'Individual' ), - ( @uf_group_id_summary, 'birth_date', 1, 0, 11, 'User and User Admin Only', 0, 0, NULL, {localize}'Date of Birth'{/localize}, 'Individual' ); + ( @uf_group_id_summary, 'phone' ,1, 0, 1, 'User and User Admin Only', 0, 0, 1, {localize}'Home Phone'{/localize}, 'Contact'), + ( @uf_group_id_summary, 'phone' ,1, 0, 2, 'User and User Admin Only', 0, 0, 2, {localize}'Home Mobile'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'street_address', 1, 0, 3, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Address'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'city', 1, 0, 4, 'User and User Admin Only', 0, 0, NULL, {localize}'City'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'state_province', 1, 0, 5, 'User and User Admin Only', 0, 0, NULL, {localize}'State'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'postal_code', 1, 0, 6, 'User and User Admin Only', 0, 0, NULL, {localize}'Postal Code'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'email', 1, 0, 7, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Email'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'group', 1, 0, 8, 'User and User Admin Only', 0, 0, NULL, {localize}'Groups'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'tag', 1, 0, 9, 'User and User Admin Only', 0, 0, NULL, {localize}'Tags'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'gender', 1, 0, 10, 'User and User Admin Only', 0, 0, NULL, {localize}'Gender'{/localize}, 'Individual' ), + ( @uf_group_id_summary, 'birth_date', 1, 0, 11, 'User and User Admin Only', 0, 0, NULL, {localize}'Date of Birth'{/localize}, 'Individual' ); -- CRM-6416 SELECT @option_group_id_ceOpt := max(id) from civicrm_option_group where name = 'contact_edit_options'; SELECT @option_value_ceOpt := max(round(value)) from civicrm_option_value where option_group_id = @option_group_id_ceOpt; SELECT @option_weight_ceOpt := max(round(weight)) from civicrm_option_value where option_group_id = @option_group_id_ceOpt; -INSERT INTO - civicrm_option_value (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `domain_id`, `visibility_id`) +INSERT INTO + civicrm_option_value (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `domain_id`, `visibility_id`) VALUES( @option_group_id_ceOpt, {localize}'Website'{/localize}, @option_value_ceOpt+1, 'Website', NULL, 1, NULL, @option_weight_ceOpt+1, 0, 0, 1, NULL, NULL, NULL ); UPDATE civicrm_preferences SET contact_edit_options = CONCAT(contact_edit_options, @option_value_ceOpt+1, ''); diff --git a/CRM/Upgrade/Incremental/sql/3.2.beta4.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.beta4.mysql.tpl index 3be159e94f..90950d0d9f 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.beta4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.beta4.mysql.tpl @@ -1,6 +1,6 @@ -- CRM-6451 {if $multilingual} - -- add a name column, populate it from the name_xx_YY chosen in + -- add a name column, populate it from the name_xx_YY chosen in ALTER TABLE civicrm_membership_status ADD name VARCHAR(128) COMMENT 'Name for Membership Status'; UPDATE civicrm_membership_status SET name = name_{$seedLocale}; -- add label_xx_YY columns and populate them from name_xx_YY, dropping the latter @@ -8,7 +8,7 @@ ALTER TABLE civicrm_membership_status ADD label_{$loc} VARCHAR(128) COMMENT 'Label for Membership Status'; UPDATE civicrm_membership_status SET label_{$loc} = name_{$loc}; {/foreach} - -- drop the column separately. + -- drop the column separately. {foreach from=$locales item=loc} ALTER TABLE civicrm_membership_status DROP name_{$loc}; {/foreach} @@ -29,14 +29,14 @@ {/if} -- CRM-6472 -DELETE civicrm_uf_field FROM civicrm_uf_field -INNER JOIN civicrm_uf_group -WHERE civicrm_uf_group.id = civicrm_uf_field.uf_group_id +DELETE civicrm_uf_field FROM civicrm_uf_field +INNER JOIN civicrm_uf_group +WHERE civicrm_uf_group.id = civicrm_uf_field.uf_group_id AND civicrm_uf_group.name = 'summary_overlay'; -DELETE civicrm_uf_join FROM civicrm_uf_join -INNER JOIN civicrm_uf_group -WHERE civicrm_uf_group.id = civicrm_uf_join.uf_group_id +DELETE civicrm_uf_join FROM civicrm_uf_join +INNER JOIN civicrm_uf_group +WHERE civicrm_uf_group.id = civicrm_uf_join.uf_group_id AND civicrm_uf_group.name = 'summary_overlay'; DELETE FROM civicrm_uf_group WHERE name = 'summary_overlay'; @@ -44,23 +44,23 @@ DELETE FROM civicrm_uf_group WHERE name = 'summary_overlay'; INSERT INTO civicrm_uf_group (name, group_type, {localize field='title'}title{/localize}, is_reserved ) VALUES ('summary_overlay', 'Contact', {localize}'Summary Overlay'{/localize}, 1 ); - + SELECT @uf_group_id_summary := max(id) FROM civicrm_uf_group WHERE name = 'summary_overlay'; INSERT INTO civicrm_uf_join (is_active,module,entity_table,entity_id,weight,uf_group_id) VALUES (1, 'Profile', NULL, NULL, 6, @uf_group_id_summary ); - + INSERT INTO civicrm_uf_field ( uf_group_id, field_name, is_required, is_reserved, weight, visibility, in_selector, is_searchable, location_type_id, {localize field='label'}label{/localize}, field_type) VALUES - ( @uf_group_id_summary, 'phone' ,1, 0, 1, 'User and User Admin Only', 0, 0, 1, {localize}'Home Phone'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'phone' ,1, 0, 2, 'User and User Admin Only', 0, 0, 2, {localize}'Home Mobile'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'street_address', 1, 0, 3, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Address'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'city', 1, 0, 4, 'User and User Admin Only', 0, 0, NULL, {localize}'City'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'state_province', 1, 0, 5, 'User and User Admin Only', 0, 0, NULL, {localize}'State'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'postal_code', 1, 0, 6, 'User and User Admin Only', 0, 0, NULL, {localize}'Postal Code'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'email', 1, 0, 7, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Email'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'group', 1, 0, 8, 'User and User Admin Only', 0, 0, NULL, {localize}'Groups'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'tag', 1, 0, 9, 'User and User Admin Only', 0, 0, NULL, {localize}'Tags'{/localize}, 'Contact' ), - ( @uf_group_id_summary, 'gender', 1, 0, 10, 'User and User Admin Only', 0, 0, NULL, {localize}'Gender'{/localize}, 'Individual' ), - ( @uf_group_id_summary, 'birth_date', 1, 0, 11, 'User and User Admin Only', 0, 0, NULL, {localize}'Date of Birth'{/localize}, 'Individual' ); \ No newline at end of file + ( @uf_group_id_summary, 'phone' ,1, 0, 1, 'User and User Admin Only', 0, 0, 1, {localize}'Home Phone'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'phone' ,1, 0, 2, 'User and User Admin Only', 0, 0, 2, {localize}'Home Mobile'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'street_address', 1, 0, 3, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Address'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'city', 1, 0, 4, 'User and User Admin Only', 0, 0, NULL, {localize}'City'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'state_province', 1, 0, 5, 'User and User Admin Only', 0, 0, NULL, {localize}'State'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'postal_code', 1, 0, 6, 'User and User Admin Only', 0, 0, NULL, {localize}'Postal Code'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'email', 1, 0, 7, 'User and User Admin Only', 0, 0, NULL, {localize}'Primary Email'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'group', 1, 0, 8, 'User and User Admin Only', 0, 0, NULL, {localize}'Groups'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'tag', 1, 0, 9, 'User and User Admin Only', 0, 0, NULL, {localize}'Tags'{/localize}, 'Contact' ), + ( @uf_group_id_summary, 'gender', 1, 0, 10, 'User and User Admin Only', 0, 0, NULL, {localize}'Gender'{/localize}, 'Individual' ), + ( @uf_group_id_summary, 'birth_date', 1, 0, 11, 'User and User Admin Only', 0, 0, NULL, {localize}'Date of Birth'{/localize}, 'Individual' ); \ No newline at end of file diff --git a/CRM/Upgrade/Incremental/sql/3.2.beta5.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.2.beta5.mysql.tpl index 45189373e1..17c1bf3ef4 100644 --- a/CRM/Upgrade/Incremental/sql/3.2.beta5.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.2.beta5.mysql.tpl @@ -4,19 +4,19 @@ SELECT @reportlastID := id FROM civicrm_navigation where name = 'Reports'; SELECT @option_group_id_report := max(id) from civicrm_option_group where name = 'report_template'; SELECT @nav_max_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @reportlastID; -INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`,{localize field='description'} `description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`,{localize field='description'} `description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_report, {localize}'{ts escape="sql"}Bookkeeping Transactions Report{/ts}'{/localize}, 'contribute/bookkeeping', 'CRM_Report_Form_Contribute_Bookkeeping', NULL, 0, 0, 29, {localize}'{ts escape="sql"}Shows Bookkeeping Transactions Report{/ts}'{/localize}, 0, 0, 1, 2, NULL); INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( @domainID, 'Bookkeeping Transactions Report', 'contribute/bookkeeping', 'Shows Bookkeeping Transactions Report', 'access CiviContribute', '{literal}a:26:{s:6:"fields";a:10:{s:12:"display_name";s:1:"1";s:12:"receive_date";s:1:"1";s:12:"total_amount";s:1:"1";s:20:"contribution_type_id";s:1:"1";s:7:"trxn_id";s:1:"1";s:10:"invoice_id";s:1:"1";s:12:"check_number";s:1:"1";s:21:"payment_instrument_id";s:1:"1";s:22:"contribution_status_id";s:1:"1";s:2:"id";s:1:"1";}s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:6:"id_min";s:0:"";s:6:"id_max";s:0:"";s:5:"id_op";s:3:"lte";s:8:"id_value";s:0:"";s:21:"receive_date_relative";s:1:"0";s:17:"receive_date_from";s:0:"";s:15:"receive_date_to";s:0:"";s:23:"contribution_type_id_op";s:2:"in";s:26:"contribution_type_id_value";a:0:{}s:25:"contribution_status_id_op";s:2:"in";s:28:"contribution_status_id_value";a:1:{i:0;s:1:"1";}s:16:"total_amount_min";s:0:"";s:16:"total_amount_max";s:0:"";s:15:"total_amount_op";s:3:"lte";s:18:"total_amount_value";s:0:"";s:11:"description";s:37:"Shows Bookkeeping Transactions Report";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:1:"0";s:9:"parent_id";s:0:"";s:6:"groups";s:0:"";s:9:"domain_id";i:1;} {/literal}'); - + SET @instanceID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES ( @domainID, CONCAT('civicrm/report/instance/', @instanceID,'&reset=1'), '{ts escape="sql"}Bookkeeping Transactions Report{/ts}', '{literal}Bookkeeping Transactions Report{/literal}', 'access CiviContribute', '', @reportlastID, '1', NULL, @nav_max_weight+1 ); -UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID; \ No newline at end of file +UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID; \ No newline at end of file diff --git a/CRM/Upgrade/Incremental/sql/3.3.0.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.0.mysql.tpl index 6bd5ea4e4f..b90b7041c4 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.0.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.0.mysql.tpl @@ -1,5 +1,5 @@ -- CRM-7088 giving respect to 'gotv campaign contacts' permission. -UPDATE civicrm_navigation +UPDATE civicrm_navigation SET permission = CONCAT( permission, ',gotv campaign contacts' ) WHERE name in ( 'Other', 'Campaigns', 'Voter Listing' ); @@ -10,7 +10,7 @@ SELECT @nav_max_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE pare INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( @domainID, 'Mail Bounce Report', 'Mailing/bounce', 'Bounce Report for mailings', 'access CiviMail', '{literal}a:30:{s:6:"fields";a:4:{s:2:"id";s:1:"1";s:10:"first_name";s:1:"1";s:9:"last_name";s:1:"1";s:5:"email";s:1:"1";}s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:9:"source_op";s:3:"has";s:12:"source_value";s:0:"";s:6:"id_min";s:0:"";s:6:"id_max";s:0:"";s:5:"id_op";s:3:"lte";s:8:"id_value";s:0:"";s:15:"mailing_name_op";s:2:"eq";s:18:"mailing_name_value";s:0:"";s:19:"bounce_type_name_op";s:2:"eq";s:22:"bounce_type_name_value";s:0:"";s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:8:"tagid_op";s:2:"in";s:11:"tagid_value";a:0:{}s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:26:"Bounce Report for mailings";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:15:"access CiviMail";s:9:"domain_id";i:1;}{/literal}'); SET @instanceID:=LAST_INSERT_ID( ); @@ -23,7 +23,7 @@ UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @ INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( @domainID, 'Mail Summary Report', 'Mailing/summary','Summary statistics for mailings','access CiviMail','{literal}a:21:{s:6:"fields";a:1:{s:4:"name";s:1:"1";}s:15:"is_completed_op";s:2:"eq";s:18:"is_completed_value";s:1:"1";s:9:"status_op";s:3:"has";s:12:"status_value";s:8:"Complete";s:11:"is_test_min";s:0:"";s:11:"is_test_max";s:0:"";s:10:"is_test_op";s:3:"lte";s:13:"is_test_value";s:1:"0";s:19:"start_date_relative";s:9:"this.year";s:15:"start_date_from";s:0:"";s:13:"start_date_to";s:0:"";s:17:"end_date_relative";s:9:"this.year";s:13:"end_date_from";s:0:"";s:11:"end_date_to";s:0:"";s:11:"description";s:31:"Summary statistics for mailings";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:15:"access CiviMail";s:9:"domain_id";i:1;}{/literal}'); SET @instanceID:=LAST_INSERT_ID( ); @@ -36,7 +36,7 @@ UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @ INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( @domainID, 'Mail Opened Report', 'Mailing/opened', 'Display contacts who opened emails from a mailing', 'access CiviMail', '{literal}a:28:{s:6:"fields";a:4:{s:2:"id";s:1:"1";s:10:"first_name";s:1:"1";s:9:"last_name";s:1:"1";s:5:"email";s:1:"1";}s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:9:"source_op";s:3:"has";s:12:"source_value";s:0:"";s:6:"id_min";s:0:"";s:6:"id_max";s:0:"";s:5:"id_op";s:3:"lte";s:8:"id_value";s:0:"";s:15:"mailing_name_op";s:2:"eq";s:18:"mailing_name_value";s:0:"";s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:8:"tagid_op";s:2:"in";s:11:"tagid_value";a:0:{}s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:49:"Display contacts who opened emails from a mailing";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:15:"access CiviMail";s:9:"domain_id";i:1;}{/literal}'); SET @instanceID:=LAST_INSERT_ID( ); @@ -48,7 +48,7 @@ VALUES UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID; INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( @domainID, 'Mail Clickthrough Report', 'Mailing/clicks', 'Display clicks from each mailing', 'access CiviMail', '{literal}a:28:{s:6:"fields";a:4:{s:2:"id";s:1:"1";s:10:"first_name";s:1:"1";s:9:"last_name";s:1:"1";s:5:"email";s:1:"1";}s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:9:"source_op";s:3:"has";s:12:"source_value";s:0:"";s:6:"id_min";s:0:"";s:6:"id_max";s:0:"";s:5:"id_op";s:3:"lte";s:8:"id_value";s:0:"";s:15:"mailing_name_op";s:2:"eq";s:18:"mailing_name_value";s:0:"";s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:8:"tagid_op";s:2:"in";s:11:"tagid_value";a:0:{}s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:32:"Display clicks from each mailing";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:15:"access CiviMail";s:9:"domain_id";i:1;}{/literal}'); SET @instanceID:=LAST_INSERT_ID( ); diff --git a/CRM/Upgrade/Incremental/sql/3.3.2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.2.mysql.tpl index 554b7d0234..91b9bad923 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.2.mysql.tpl @@ -22,9 +22,9 @@ UPDATE `civicrm_navigation` SET `label` = '{ts escape="sql"}Participant Listing --CRM--7197 {if $dropMailingIndex} ALTER TABLE civicrm_mailing_job -DROP FOREIGN KEY parent_id, +DROP FOREIGN KEY parent_id, DROP INDEX parent_id , -ADD CONSTRAINT FK_civicrm_mailing_job_parent_id +ADD CONSTRAINT FK_civicrm_mailing_job_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_mailing_job (id) ON DELETE CASCADE; {/if} -- CRM-7206 @@ -60,11 +60,11 @@ SELECT @option_group_id_approvalStatus := max(id) from civicrm_option_group wher {else} INSERT INTO civicrm_option_value (option_group_id, label, name, value, weight, is_active, component_id, is_default ) - + VALUES (@option_group_id_approvalStatus , '{ts escape="sql"}Approved{/ts}', 'Approved', 1, 1, 1, @mailCompId, 1 ), (@option_group_id_approvalStatus , '{ts escape="sql"}Rejected{/ts}', 'Rejected', 2, 2, 1, @mailCompId, 0 ), - (@option_group_id_approvalStatus , '{ts escape="sql"}None{/ts}', 'None', 3, 3, 1, @mailCompId, 0 ); + (@option_group_id_approvalStatus , '{ts escape="sql"}None{/ts}', 'None', 3, 3, 1, @mailCompId, 0 ); {/if} -- CRM-7170 @@ -79,12 +79,12 @@ UPDATE civicrm_report_instance SET form_values = '{literal}a:37:{s:6:"fields";a: -- CRM-7115 UPDATE civicrm_payment_processor SET is_recur = 1, - payment_processor_type = 'AuthNet' + payment_processor_type = 'AuthNet' WHERE payment_processor_type = 'AuthNet_AIM'; UPDATE civicrm_payment_processor_type - SET is_recur = 1, - name = 'AuthNet', + SET is_recur = 1, + name = 'AuthNet', title = '{ts escape="sql"}Authorize.Net{/ts}' WHERE name = 'AuthNet_AIM'; @@ -96,8 +96,8 @@ ALTER TABLE `civicrm_contribution_recur` ADD CONSTRAINT `FK_civicrm_contribution UPDATE civicrm_contribution_recur recur INNER JOIN civicrm_contribution contrib ON ( contrib.contribution_recur_id = recur.id ) INNER JOIN civicrm_entity_financial_trxn eft ON ( eft.entity_id = contrib.id AND entity_table = 'civicrm_contribution' ) -INNER JOIN civicrm_financial_trxn trxn ON ( trxn.id = eft.financial_trxn_id ) -INNER JOIN civicrm_payment_processor processor ON ( processor.payment_processor_type = trxn.payment_processor +INNER JOIN civicrm_financial_trxn trxn ON ( trxn.id = eft.financial_trxn_id ) +INNER JOIN civicrm_payment_processor processor ON ( processor.payment_processor_type = trxn.payment_processor AND processor.is_test = recur.is_test ) SET recur.payment_processor_id = processor.id; @@ -108,11 +108,11 @@ INNER JOIN civicrm_payment_processor processor ON ( processor.payment_processor ADD `contribution_recur_id` int(10) unsigned default NULL COMMENT 'Conditional foreign key to civicrm_contribution_recur.id.', ADD CONSTRAINT `FK_civicrm_membership_contribution_recur_id` FOREIGN KEY (`contribution_recur_id`) REFERENCES `civicrm_contribution_recur` (`id`) ON DELETE SET NULL; - ALTER TABLE `civicrm_membership_type` + ALTER TABLE `civicrm_membership_type` ADD `auto_renew` TINYINT (4) NULL DEFAULT '0', ADD `autorenewal_msg_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_msg_template.id', ADD CONSTRAINT `FK_civicrm_membership_autorenewal_msg_id` FOREIGN KEY (`autorenewal_msg_id`) REFERENCES `civicrm_msg_template` (`id`) ON DELETE SET NULL; -- CRM-7137 - + {include file='../CRM/Upgrade/3.3.2.msg_template/civicrm_msg_template.tpl'} \ No newline at end of file diff --git a/CRM/Upgrade/Incremental/sql/3.3.4.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.4.mysql.tpl index 1d20e6a024..5ca2b27f43 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.4.mysql.tpl @@ -1,18 +1,18 @@ -- CRM-7455 -UPDATE civicrm_report_instance - SET title = '{ts escape="sql"}Grant Report (Detail){/ts}', - report_id = 'grant/detail', +UPDATE civicrm_report_instance + SET title = '{ts escape="sql"}Grant Report (Detail){/ts}', + report_id = 'grant/detail', description = '{ts escape="sql"}Grant Report Detail{/ts}', form_values = '{literal}a:37:{s:6:"fields";a:2:{s:12:"display_name";s:1:"1";s:25:"application_received_date";s:1:"1";}s:15:"display_name_op";s:3:"has";s:18:"display_name_value";s:0:"";s:12:"gender_id_op";s:2:"in";s:15:"gender_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"grant_type_op";s:2:"in";s:16:"grant_type_value";a:0:{}s:12:"status_id_op";s:2:"in";s:15:"status_id_value";a:0:{}s:18:"amount_granted_min";s:0:"";s:18:"amount_granted_max";s:0:"";s:17:"amount_granted_op";s:3:"lte";s:20:"amount_granted_value";s:0:"";s:20:"amount_requested_min";s:0:"";s:20:"amount_requested_max";s:0:"";s:19:"amount_requested_op";s:3:"lte";s:22:"amount_requested_value";s:0:"";s:34:"application_received_date_relative";s:1:"0";s:30:"application_received_date_from";s:0:"";s:28:"application_received_date_to";s:0:"";s:28:"money_transfer_date_relative";s:1:"0";s:24:"money_transfer_date_from";s:0:"";s:22:"money_transfer_date_to";s:0:"";s:23:"grant_due_date_relative";s:1:"0";s:19:"grant_due_date_from";s:0:"";s:17:"grant_due_date_to";s:0:"";s:11:"description";s:19:"Grant Report Detail";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:16:"access CiviGrant";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}{/literal}' WHERE report_id = 'grant'; {if $multilingual} UPDATE civicrm_option_value - SET value = 'grant/detail', + SET value = 'grant/detail', name = 'CRM_Report_Form_Grant_Detail' WHERE value = 'grant' AND name = 'CRM_Report_Form_Grant'; - + {foreach from=$locales item=loc} UPDATE civicrm_option_value SET label_{$loc} = '{ts escape="sql"}Grant Report (Detail){/ts}', @@ -25,7 +25,7 @@ UPDATE civicrm_option_value UPDATE civicrm_option_value SET label = '{ts escape="sql"}Grant Report (Detail){/ts}', - value = 'grant/detail', + value = 'grant/detail', name = 'CRM_Report_Form_Grant_Detail', description = '{ts escape="sql"}Grant Report Detail{/ts}' WHERE value = 'grant' @@ -46,13 +46,13 @@ SELECT @grantCompId := MAX(id) FROM civicrm_component WHERE name = 'CiviGran SELECT @max_weight := MAX(ROUND(weight)) FROM civicrm_option_value WHERE option_group_id = @ogrID; INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) VALUES (@ogrID , {localize}'{ts escape="sql"}Grant Report (Statistics){/ts}'{/localize}, 'grant/statistics', 'CRM_Report_Form_Grant_Statistics', NULL, 0, 0, @max_weight+1, {localize}'{ts escape="sql"}Shows statistics for Grants{/ts}'{/localize}, 0, 0, 1, @grantCompId, NULL); - + INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( @domainID, 'Grant Report (Statistics)', 'grant/statistics', 'Shows statistics for Grants', 'access CiviGrant', '{literal}a:45:{s:6:"fields";a:3:{s:18:"summary_statistics";s:1:"1";s:9:"gender_id";s:1:"1";s:12:"contact_type";s:1:"1";}s:34:"application_received_date_relative";s:1:"0";s:30:"application_received_date_from";s:0:"";s:28:"application_received_date_to";s:0:"";s:22:"decision_date_relative";s:1:"0";s:18:"decision_date_from";s:0:"";s:16:"decision_date_to";s:0:"";s:28:"money_transfer_date_relative";s:1:"0";s:24:"money_transfer_date_from";s:0:"";s:22:"money_transfer_date_to";s:0:"";s:23:"grant_due_date_relative";s:1:"0";s:19:"grant_due_date_from";s:0:"";s:17:"grant_due_date_to";s:0:"";s:13:"grant_type_op";s:2:"in";s:16:"grant_type_value";a:1:{i:0;s:1:"1";}s:12:"status_id_op";s:2:"in";s:15:"status_id_value";a:0:{}s:20:"amount_requested_min";s:0:"";s:20:"amount_requested_max";s:0:"";s:19:"amount_requested_op";s:3:"lte";s:22:"amount_requested_value";s:0:"";s:18:"amount_granted_min";s:0:"";s:18:"amount_granted_max";s:0:"";s:17:"amount_granted_op";s:3:"lte";s:20:"amount_granted_value";s:0:"";s:24:"grant_report_received_op";s:2:"eq";s:27:"grant_report_received_value";s:0:"";s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"region_id_op";s:2:"in";s:15:"region_id_value";a:0:{}s:11:"custom_7_op";s:2:"in";s:14:"custom_7_value";a:0:{}s:11:"custom_9_op";s:3:"has";s:14:"custom_9_value";s:0:"";s:11:"custom_8_op";s:4:"mhas";s:14:"custom_8_value";a:0:{}s:11:"description";s:28:"Shows statistics for Grants.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:16:"access CiviGrant";s:9:"parent_id";s:0:"";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}{/literal}'); SET @instanceID:=LAST_INSERT_ID(); diff --git a/CRM/Upgrade/Incremental/sql/3.3.6.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.6.mysql.tpl index b3d03b9e75..f03419ed81 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.6.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.6.mysql.tpl @@ -1,10 +1,10 @@ -- CRM-7455 -UPDATE civicrm_navigation +UPDATE civicrm_navigation SET name = 'Grant Report Detail' WHERE name LIKE 'Grant Report (Detail)'; -UPDATE civicrm_navigation +UPDATE civicrm_navigation SET name = 'Grant Report Statistics' WHERE name LIKE 'Grant Report (Statistics)' OR name LIKE 'Shows statistics for grants'; @@ -12,6 +12,6 @@ SELECT @weight := weight FROM civicrm_navigation WHERE name LIKE 'Grant Report Detail'; -UPDATE civicrm_navigation +UPDATE civicrm_navigation SET weight = @weight WHERE name LIKE 'Grant Report Statistics'; \ No newline at end of file diff --git a/CRM/Upgrade/Incremental/sql/3.3.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.alpha1.mysql.tpl index 5b504cb459..1b9cfbd850 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.alpha1.mysql.tpl @@ -9,15 +9,15 @@ SELECT @max_weight := MAX(ROUND(weight)) from civicrm_option_value INSERT INTO civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, visibility_id) VALUES - (@option_group_id_website, {localize}'Main'{/localize}, @max_value+1, 'Main', NULL, 0, NULL, @max_weight+1, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL); - + (@option_group_id_website, {localize}'Main'{/localize}, @max_value+1, 'Main', NULL, 0, NULL, @max_weight+1, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL); + -- CRM-6763 -UPDATE civicrm_option_group +UPDATE civicrm_option_group SET is_reserved = 0 WHERE civicrm_option_group.name = 'encounter_medium'; -- CRM-6814 -ALTER TABLE `civicrm_note` +ALTER TABLE `civicrm_note` ADD `privacy` INT( 10 ) NOT NULL COMMENT 'Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)'; UPDATE `civicrm_note` SET `privacy` = '0' WHERE 1; @@ -40,7 +40,7 @@ UPDATE civicrm_navigation SET url = 'civicrm/admin/contribute/add&reset=1&action WHERE civicrm_navigation.name = 'New Contribution Page'; -- CRM-6507 -ALTER TABLE civicrm_participant +ALTER TABLE civicrm_participant CHANGE role_id role_id varchar(128) collate utf8_unicode_ci NULL default NULL COMMENT 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'; -- @@ -73,7 +73,7 @@ CREATE TABLE `civicrm_campaign` ( )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE `civicrm_campaign_group` ( +CREATE TABLE `civicrm_campaign_group` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Campaign Group id.', `campaign_id` int unsigned NOT NULL COMMENT 'Foreign key to the activity Campaign.', `group_type` enum('Include','Exclude') NULL DEFAULT NULL COMMENT 'Type of Group.', @@ -84,7 +84,7 @@ CREATE TABLE `civicrm_campaign_group` ( )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE `civicrm_survey` ( +CREATE TABLE `civicrm_survey` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Campaign Group id.', `title` varchar(255) NOT NULL COMMENT 'Title of the Survey.', `campaign_id` int unsigned DEFAULT NULL COMMENT 'Foreign key to the activity Campaign.', @@ -116,13 +116,13 @@ ALTER TABLE `civicrm_activity` ADD `result` VARCHAR( 255 ) CHARACTER SET utf8 CO INSERT INTO civicrm_component (name, namespace) VALUES ('CiviCampaign' , 'CRM_Campaign' ); INSERT INTO civicrm_option_group - (`name`, {localize field='description'}description{/localize}, `is_active`) + (`name`, {localize field='description'}description{/localize}, `is_active`) VALUES - ('campaign_type' , {localize}'Campaign Type'{/localize} , 1 ), - ('campaign_status' , {localize}'Campaign Status'{/localize} , 1 ); + ('campaign_type' , {localize}'Campaign Type'{/localize} , 1 ), + ('campaign_status' , {localize}'Campaign Status'{/localize} , 1 ); --insert values for Compaign Types, Campaign Status and Activity types. - + SELECT @option_group_id_campaignType := max(id) from civicrm_option_group where name = 'campaign_type'; SELECT @option_group_id_campaignStatus := max(id) from civicrm_option_group where name = 'campaign_status'; SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type'; @@ -130,14 +130,14 @@ SELECT @campaignCompId := max(id) FROM civicrm_component where n SELECT @max_campaign_act_val := MAX(ROUND(value)) from civicrm_option_value where option_group_id = @option_group_id_act; SELECT @max_campaign_act_wt := MAX(ROUND(weight)) from civicrm_option_value where option_group_id = @option_group_id_act; -INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `weight`, `is_active`, `component_id` ) +INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `weight`, `is_active`, `component_id` ) VALUES (@option_group_id_campaignType, {localize}'Direct Mail'{/localize}, 1, 'Direct Mail', 1, 1, NULL ), (@option_group_id_campaignType, {localize}'Referral Program'{/localize}, 2, 'Referral Program', 2, 1, NULL ), (@option_group_id_campaignType, {localize}'Voter Engagement'{/localize}, 3, 'Voter Engagement', 3, 1, NULL ), - (@option_group_id_campaignStatus, {localize}'Planned'{/localize}, 1, 'Planned', 1, 1, NULL ), + (@option_group_id_campaignStatus, {localize}'Planned'{/localize}, 1, 'Planned', 1, 1, NULL ), (@option_group_id_campaignStatus, {localize}'In Progress'{/localize}, 2, 'In Progress', 2, 1, NULL ), (@option_group_id_campaignStatus, {localize}'Completed'{/localize}, 3, 'Completed', 3, 1, NULL ), (@option_group_id_campaignStatus, {localize}'Cancelled'{/localize}, 4, 'Cancelled', 4, 1, NULL ), @@ -154,8 +154,8 @@ SELECT @nav_other_id := id FROM civicrm_navigation WHERE name = 'Other'; SELECT @nav_other_wt := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_other_id; --insert campaigns permissions in 'Other' navigation menu permissions. -UPDATE civicrm_navigation - SET permission = CONCAT( permission, ',administer CiviCampaign,manage campaign,reserve campaign contacts,release campaign contacts,interview campaign contacts' ) +UPDATE civicrm_navigation + SET permission = CONCAT( permission, ',administer CiviCampaign,manage campaign,reserve campaign contacts,release campaign contacts,interview campaign contacts' ) WHERE id = @nav_other_id; INSERT INTO civicrm_navigation @@ -167,18 +167,18 @@ SELECT @nav_campaign_id := id FROM civicrm_navigation WHERE name = 'Campaigns INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, 'civicrm/campaign&reset=1', '{ts escape="sql"}Dashboard{/ts}', 'Dashboard', 'administer CiviCampaign', '', @nav_campaign_id, '1', NULL, 1 ); SET @campaigndashboardlastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES - ( @domainID, 'civicrm/campaign&reset=1&subPage=survey', '{ts escape="sql"}Surveys{/ts}', 'Survey Dashboard', 'administer CiviCampaign', '', @campaigndashboardlastID, '1', NULL, 1 ), +VALUES + ( @domainID, 'civicrm/campaign&reset=1&subPage=survey', '{ts escape="sql"}Surveys{/ts}', 'Survey Dashboard', 'administer CiviCampaign', '', @campaigndashboardlastID, '1', NULL, 1 ), ( @domainID, 'civicrm/campaign&reset=1&subPage=petition', '{ts escape="sql"}Petition{/ts}', 'Petition Dashboard', 'administer CiviCampaign', '', @campaigndashboardlastID, '1', NULL, 2 ), ( @domainID, 'civicrm/campaign&reset=1&subPage=campaign', '{ts escape="sql"}Campaigns{/ts}', 'Campaign Dashboard', 'administer CiviCampaign', '', @campaigndashboardlastID, '1', NULL, 3 ), - ( @domainID, 'civicrm/campaign/add&reset=1', '{ts escape="sql"}New Campaign{/ts}', 'New Campaign', 'administer CiviCampaign', '', @nav_campaign_id, '1', NULL, 2 ), + ( @domainID, 'civicrm/campaign/add&reset=1', '{ts escape="sql"}New Campaign{/ts}', 'New Campaign', 'administer CiviCampaign', '', @nav_campaign_id, '1', NULL, 2 ), ( @domainID, 'civicrm/survey/add&reset=1', '{ts escape="sql"}New Survey{/ts}', 'New Survey', 'administer CiviCampaign', '', @nav_campaign_id, '1', NULL, 3 ), ( @domainID, 'civicrm/petition/add&reset=1', '{ts escape="sql"}New Petition{/ts}', 'New Petition', 'administer CiviCampaign', '', @nav_campaign_id, '1', NULL, 4 ), ( @domainID, 'civicrm/survey/search&reset=1&op=reserve', '{ts escape="sql"}Reserve Voters{/ts}', 'Reserve Voters', 'administer CiviCampaign,manage campaign,reserve campaign contacts', 'OR', @nav_campaign_id, '1', NULL, 5 ), @@ -195,16 +195,16 @@ VALUES insert into civicrm_option_group (name, is_active) values ('system_extensions', 1 ); -- CRM-6907 - ALTER TABLE `civicrm_event` - ADD `currency` VARCHAR( 3 ) -CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL + ALTER TABLE `civicrm_event` + ADD `currency` VARCHAR( 3 ) +CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '3 character string, value from config setting or input via user.'; UPDATE `civicrm_event` SET `currency` = '{$config->defaultCurrency}'; - ALTER TABLE `civicrm_contribution_page` - ADD `currency` VARCHAR( 3 ) -CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + ALTER TABLE `civicrm_contribution_page` + ADD `currency` VARCHAR( 3 ) +CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '3 character string, value from config setting or input via user.'; UPDATE `civicrm_contribution_page` SET `currency` = '{$config->defaultCurrency}'; @@ -213,18 +213,18 @@ CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ALTER TABLE civicrm_option_value MODIFY COLUMN value varchar(512); INSERT INTO civicrm_option_group - (`name`, {localize field='description'}description{/localize}, `is_active`) + (`name`, {localize field='description'}description{/localize}, `is_active`) VALUES - ('directory_preferences', {localize}'Directory Preferences'{/localize} , 1 ), - ('url_preferences' , {localize}'URL Preferences'{/localize} , 1 ); + ('directory_preferences', {localize}'Directory Preferences'{/localize} , 1 ), + ('url_preferences' , {localize}'URL Preferences'{/localize} , 1 ); --insert values for Directory and URL preferences - + SELECT @option_group_id_dirPref := max(id) from civicrm_option_group where name = 'directory_preferences'; SELECT @option_group_id_urlPref := max(id) from civicrm_option_group where name = 'url_preferences'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `name`, `value`, `weight`, `is_active`, `domain_id` ) +INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `name`, `value`, `weight`, `is_active`, `domain_id` ) VALUES (@option_group_id_dirPref, {localize}'Temporary Files'{/localize} , 'uploadDir' , '', 1, 1, @domainID ), (@option_group_id_dirPref, {localize}'Images'{/localize} , 'imageUploadDir' , '', 2, 1, @domainID ), @@ -251,12 +251,12 @@ SELECT @max_weight := max(ROUND(weight)) from civicrm_option_value WHERE option SELECT @caseCompId := max(id) FROM civicrm_component where name = 'CiviCase'; INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) VALUES (@ogrID, {localize}'{ts escape="sql"}Case Detail Report{/ts}'{/localize}, 'case/detail', 'CRM_Report_Form_Case_Detail', NULL, 0, 0, @max_weight+1, {localize}'{ts escape="sql"}Case Details{/ts}'{/localize}, 0, 0, 1, @caseCompId, NULL); -- CRM-5718 -UPDATE civicrm_contribution_widget +UPDATE civicrm_contribution_widget SET color_title = CONCAT( '#', SUBSTRING( color_title, 3 ) ), color_button = CONCAT( '#', SUBSTRING( color_button, 3 ) ), color_bar = CONCAT( '#', SUBSTRING( color_bar, 3 ) ), @@ -266,7 +266,7 @@ UPDATE civicrm_contribution_widget color_bg = CONCAT( '#', SUBSTRING( color_bg, 3 ) ), color_about_link = CONCAT( '#', SUBSTRING( color_about_link, 3 ) ), color_homepage_link = CONCAT( '#', SUBSTRING( color_homepage_link, 3 ) ); - + --CRM-4572 @@ -287,13 +287,13 @@ ALTER TABLE civicrm_contact DROP mail_to_household_id; INSERT INTO civicrm_uf_group (name, group_type, {localize field='title'}title{/localize}, is_reserved ) VALUES ('shared_address', 'Contact', {localize}'Shared Address'{/localize}, 1 ); - + SELECT @uf_group_id_sharedAddress := max(id) from civicrm_uf_group where name = 'shared_address'; INSERT INTO civicrm_uf_join (is_active,module,entity_table,entity_id,weight,uf_group_id) VALUES (1, 'Profile', NULL, NULL, 7, @uf_group_id_sharedAddress ); - + INSERT INTO civicrm_uf_field (uf_group_id, field_name, is_required, is_reserved, weight, visibility, in_selector, is_searchable, location_type_id, {localize field='label'}label{/localize}, field_type, {localize field='help_post'}help_post{/localize}, phone_type_id ) VALUES (@uf_group_id_sharedAddress, 'street_address', 0, 0, 1, 'User and User Admin Only', 0, 0, 1, {localize}'Street Address (Home)'{/localize}, 'Contact', {localize}NULL{/localize}, NULL), @@ -303,11 +303,11 @@ INSERT INTO civicrm_uf_field (@uf_group_id_sharedAddress, 'state_province', 0, 0, 5, 'Public Pages and Listings', 1, 1, 1, {localize}'State (Home)'{/localize}, 'Contact', {localize}NULL{/localize}, NULL); -- CRM-6894 -CREATE TABLE `civicrm_batch` ( +CREATE TABLE `civicrm_batch` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Address ID.', - `name` varchar(64) DEFAULT NULL COMMENT 'Variable name/programmatic handle for this batch.', - `label` varchar(64) DEFAULT NULL COMMENT 'Friendly Name.', - `description` text COMMENT 'Description of this batch set.', + `name` varchar(64) DEFAULT NULL COMMENT 'Variable name/programmatic handle for this batch.', + `label` varchar(64) DEFAULT NULL COMMENT 'Friendly Name.', + `description` text COMMENT 'Description of this batch set.', `created_id` int(10) unsigned default NULL COMMENT 'FK to Contact ID', `created_date` datetime default NULL COMMENT 'When was this item created', `modified_id` int(10) unsigned default NULL COMMENT 'FK to Contact ID', diff --git a/CRM/Upgrade/Incremental/sql/3.3.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.alpha2.mysql.tpl index 5c49c79803..1143674622 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.alpha2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.alpha2.mysql.tpl @@ -4,7 +4,7 @@ SELECT @uf_group_id_sharedAddress := max(id) from civicrm_uf_group where name UPDATE `civicrm_uf_field` SET `is_reserved` = '1', - `is_required` = '1' + `is_required` = '1' WHERE civicrm_uf_field.uf_group_id = @uf_group_id_sharedAddress AND civicrm_uf_field.field_name IN ('city', 'street_address' ); -- CRM-6977 diff --git a/CRM/Upgrade/Incremental/sql/3.3.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.beta1.mysql.tpl index ee6668e117..3ba7adc01b 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.beta1.mysql.tpl @@ -7,10 +7,10 @@ SELECT @max_weight := MAX(ROUND(weight)) from civicrm_option_value w INSERT INTO civicrm_option_value ( option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, domain_id, visibility_id ) VALUES - ( @option_group_id_editor, {localize}'Joomla Default Editor'{/localize}, @max_value+1, NULL, NULL, 0, NULL, @max_weight+1, {localize}NULL{/localize}, 0, 1, 1, NULL, @domainID, NULL ); + ( @option_group_id_editor, {localize}'Joomla Default Editor'{/localize}, @max_value+1, NULL, NULL, 0, NULL, @max_weight+1, {localize}NULL{/localize}, 0, 1, 1, NULL, @domainID, NULL ); -- CRM-6846 -CREATE TABLE `civicrm_price_field_value` +CREATE TABLE `civicrm_price_field_value` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Price Field Value', `price_field_id` int(10) unsigned NOT NULL COMMENT 'FK to civicrm_price_field', `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Price field option name', @@ -35,21 +35,21 @@ UPDATE civicrm_uf_field WHERE civicrm_uf_field.uf_group_id = @uf_group_id_sharedAddress AND civicrm_uf_field.field_name= 'country'; --CRM-7031 -ALTER TABLE `civicrm_participant` +ALTER TABLE `civicrm_participant` CHANGE `fee_currency` `fee_currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value derived from config setting.'; -ALTER TABLE `civicrm_contribution` +ALTER TABLE `civicrm_contribution` CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; -ALTER TABLE `civicrm_grant` +ALTER TABLE `civicrm_grant` CHANGE `currency` `currency` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; -ALTER TABLE `civicrm_pcp` +ALTER TABLE `civicrm_pcp` CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; -ALTER TABLE `civicrm_pledge` +ALTER TABLE `civicrm_pledge` CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; - + -- insert civimail settings into nav menu SELECT @domainID := MIN(id) FROM civicrm_domain; SELECT @nav_civimailadmin_id := id FROM civicrm_navigation WHERE name = 'CiviMail'; @@ -59,12 +59,12 @@ ALTER TABLE `civicrm_pledge` ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES ( @domainID, 'civicrm/admin/mail&reset=1', '{ts escape="sql"}Mailer Settings{/ts}', 'Mailer Settings', 'access CiviMail,administer CiviCRM', 'AND', @nav_civimailadmin_id, '1', NULL, @nav_civimailadmin_wt + 1 ); - + -- update petition system workflow message templates {include file='../CRM/Upgrade/3.3.beta1.msg_template/civicrm_msg_template.tpl'} - + -- CRM-6231 -tweak permissions. -UPDATE civicrm_navigation +UPDATE civicrm_navigation SET permission = CONCAT( permission, ',manage campaign' ), permission_operator = 'OR' WHERE name in ( 'Dashboard', 'Survey Dashboard', 'Petition Dashboard', 'Campaign Dashboard', 'New Campaign', 'New Survey', 'New Petition' ) @@ -81,11 +81,11 @@ SELECT @campaignTypeOptGrpID := MAX(id) from civicrm_option_group where name = UPDATE civicrm_option_value SET {localize field='label'}label = REPLACE(label, 'Voter', 'Constituent' ){/localize}, - name = REPLACE(name, 'Voter', 'Constituent' ) + name = REPLACE(name, 'Voter', 'Constituent' ) WHERE name = 'Voter Engagement' AND option_group_id = @campaignTypeOptGrpID; -UPDATE civicrm_navigation +UPDATE civicrm_navigation SET permission = CONCAT( permission, ',release campaign contacts' ) WHERE name like 'Voter Listing' AND permission = 'administer CiviCampaign,manage campaign'; diff --git a/CRM/Upgrade/Incremental/sql/3.3.beta2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.3.beta2.mysql.tpl index 100f55c18b..00e72983c8 100644 --- a/CRM/Upgrade/Incremental/sql/3.3.beta2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.3.beta2.mysql.tpl @@ -4,8 +4,8 @@ -- CRM-6410, Create CiviMail Reports SELECT @option_group_id_report := max(id) from civicrm_option_group where name = 'report_template'; SELECT @mailCompId := max(id) FROM civicrm_component where name = 'CiviMail'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_report, {localize}'{ts escape="sql"}Mail Bounce Report{/ts}'{/localize}, 'Mailing/bounce', 'CRM_Report_Form_Mailing_Bounce', NULL, 0, NULL, 34, {localize}'{ts escape="sql"}Bounce Report for mailings{/ts}'{/localize}, 0, 0, 1, @mailCompId, NULL), (@option_group_id_report, {localize}'{ts escape="sql"}Mail Summary Report{/ts}'{/localize}, 'Mailing/summary', 'CRM_Report_Form_Mailing_Summary', NULL, 0, NULL, 35, {localize}'{ts escape="sql"}Summary statistics for mailings{/ts}'{/localize}, 0, 0, 1, @mailCompId, NULL), @@ -25,16 +25,16 @@ ALTER TABLE `civicrm_pledge_payment` CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; ALTER TABLE `civicrm_contribution_recur` - CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; + CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; ALTER TABLE `civicrm_product` - CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; + CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; ALTER TABLE `civicrm_contribution_soft` - CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; + CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; ALTER TABLE `civicrm_contribution_page` - CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; + CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; -- CRM-7088 UPDATE civicrm_navigation diff --git a/CRM/Upgrade/Incremental/sql/3.4.0.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.0.mysql.tpl index 07c6499d00..d4d57686c5 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.0.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.0.mysql.tpl @@ -9,7 +9,7 @@ VALUES SELECT @option_group_id_cgeo := max(id) from civicrm_option_group where name = 'cg_extend_objects'; -INSERT INTO civicrm_option_value +INSERT INTO civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, is_optgroup, is_reserved, is_active, component_id, visibility_id) VALUES (@option_group_id_cgeo, {localize}'{ts escape="sql"}Survey{/ts}'{/localize}, 'Survey', 'civicrm_survey', NULL, 0, NULL, 1, 0, 0, 1, NULL, NULL); diff --git a/CRM/Upgrade/Incremental/sql/3.4.1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.1.mysql.tpl index 87eb657122..0fa2f1ea13 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.1.mysql.tpl @@ -1,4 +1,4 @@ --- CRM-7796 +-- CRM-7796 ALTER TABLE `civicrm_dashboard` ADD `fullscreen_url` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'fullscreen url for dashlet'; @@ -18,14 +18,14 @@ SELECT @adminCampaignWeight := MAX(weight)+1 FROM civicrm_navigation where paren INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( {$domainID}, NULL, '{ts escape="sql" skip="true"}CiviCampaign{/ts}', 'CiviCampaign', 'administer CiviCampaign,administer CiviCRM', 'AND', @administerID, '1', NULL, @adminCampaignWeight ); SET @adminCampaignID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( {$domainID}, 'civicrm/admin/campaign/surveyType&reset=1', '{ts escape="sql" skip="true"}Survey Types{/ts}', 'Survey Types', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 1 ), ( {$domainID}, 'civicrm/admin/options/campaign_type&group=campaign_type&reset=1', '{ts escape="sql" skip="true"}Campaign Types{/ts}', 'Campaign Types', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 2 ), ( {$domainID}, 'civicrm/admin/options/campaign_status&group=campaign_status&reset=1', '{ts escape="sql" skip="true"}Campaign Status{/ts}', 'Campaign Status', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 3 ), @@ -39,16 +39,16 @@ SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_i INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( {$domainID}, 'civicrm/admin/extensions&reset=1', '{ts escape="sql" skip="true"}Manage CiviCRM Extensions{/ts}', 'Manage CiviCRM Extensions', 'administer CiviCRM', '', @customizeID, '1', NULL, @extensionsWeight ); -- CRM-7878 -- insert drupal wysiwyg editor option SELECT @option_group_id_we := max(id) from civicrm_option_group where name = 'wysiwyg_editor'; -INSERT INTO civicrm_option_value +INSERT INTO civicrm_option_value ( option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_active, component_id, domain_id, visibility_id ) -VALUES +VALUES ( @option_group_id_we, {localize}'Drupal Default Editor'{/localize}, 4, NULL, NULL, 0, NULL, 4, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL ); -- CRM-7988 allow negative start and end date offsets for custom fields diff --git a/CRM/Upgrade/Incremental/sql/3.4.2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.2.mysql.tpl index 1e95d3d597..89a0e4d813 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.2.mysql.tpl @@ -90,19 +90,19 @@ VALUES -- Insert Label Formats SELECT @option_group_id_label := max(id) from civicrm_option_group where name = 'label_format'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES - (@option_group_id_label, {localize}'Avery 3475'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":10,"font-style":"","metric":"mm","lMargin":0,"tMargin":5,"NX":3,"NY":8,"SpaceX":0,"SpaceY":0,"width":70,"height":36,"lPadding":5.08,"tPadding":5.08}{/literal}', '3475', 'Avery', NULL, 0, 1, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery 5160'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.21975,"tMargin":0.5,"NX":3,"NY":10,"SpaceX":0.14,"SpaceY":0,"width":2.5935,"height":1,"lPadding":0.20,"tPadding":0.20}{/literal}', '5160', 'Avery', NULL, 0, 2, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery 5161'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.175,"tMargin":0.5,"NX":2,"NY":10,"SpaceX":0.15625,"SpaceY":0,"width":4,"height":1,"lPadding":0.20,"tPadding":0.20}{/literal}', '5161', 'Avery', NULL, 0, 3, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery 5162'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.1525,"tMargin":0.88,"NX":2,"NY":7,"SpaceX":0.195,"SpaceY":0,"width":4,"height":1.33,"lPadding":0.20,"tPadding":0.20}{/literal}', '5162', 'Avery', NULL, 0, 4, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery 5163'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.18,"tMargin":0.5,"NX":2,"NY":5,"SpaceX":0.14,"SpaceY":0,"width":4,"height":2,"lPadding":0.20,"tPadding":0.20}{/literal}', '5163', 'Avery', NULL, 0, 5, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery 5164'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":12,"font-style":"","metric":"in","lMargin":0.156,"tMargin":0.5,"NX":2,"NY":3,"SpaceX":0.1875,"SpaceY":0,"width":4,"height":3.33,"lPadding":0.20,"tPadding":0.20}{/literal}', '5164', 'Avery', NULL, 0, 6, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery 8600'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"mm","lMargin":7.1,"tMargin":19,"NX":3,"NY":10,"SpaceX":9.5,"SpaceY":3.1,"width":66.6,"height":25.4,"lPadding":5.08,"tPadding":5.08}{/literal}', '8600', 'Avery', NULL, 0, 7, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery L7160'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.28,"tMargin":0.6,"NX":3,"NY":7,"SpaceX":0.1,"SpaceY":0,"width":2.5,"height":1.5,"lPadding":0.20,"tPadding":0.20}{/literal}', 'L7160', 'Avery', NULL, 0, 8, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery L7161'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.28,"tMargin":0.35,"NX":3,"NY":6,"SpaceX":0.1,"SpaceY":0,"width":2.5,"height":1.83,"lPadding":0.20,"tPadding":0.20}{/literal}', 'L7161', 'Avery', NULL, 0, 9, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), - (@option_group_id_label, {localize}'Avery L7162'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.18,"tMargin":0.51,"NX":2,"NY":8,"SpaceX":0.1,"SpaceY":0,"width":3.9,"height":1.33,"lPadding":0.20,"tPadding":0.20}{/literal}', 'L7162', 'Avery', NULL, 0, 10, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery 3475'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":10,"font-style":"","metric":"mm","lMargin":0,"tMargin":5,"NX":3,"NY":8,"SpaceX":0,"SpaceY":0,"width":70,"height":36,"lPadding":5.08,"tPadding":5.08}{/literal}', '3475', 'Avery', NULL, 0, 1, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery 5160'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.21975,"tMargin":0.5,"NX":3,"NY":10,"SpaceX":0.14,"SpaceY":0,"width":2.5935,"height":1,"lPadding":0.20,"tPadding":0.20}{/literal}', '5160', 'Avery', NULL, 0, 2, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery 5161'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.175,"tMargin":0.5,"NX":2,"NY":10,"SpaceX":0.15625,"SpaceY":0,"width":4,"height":1,"lPadding":0.20,"tPadding":0.20}{/literal}', '5161', 'Avery', NULL, 0, 3, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery 5162'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.1525,"tMargin":0.88,"NX":2,"NY":7,"SpaceX":0.195,"SpaceY":0,"width":4,"height":1.33,"lPadding":0.20,"tPadding":0.20}{/literal}', '5162', 'Avery', NULL, 0, 4, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery 5163'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"in","lMargin":0.18,"tMargin":0.5,"NX":2,"NY":5,"SpaceX":0.14,"SpaceY":0,"width":4,"height":2,"lPadding":0.20,"tPadding":0.20}{/literal}', '5163', 'Avery', NULL, 0, 5, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery 5164'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":12,"font-style":"","metric":"in","lMargin":0.156,"tMargin":0.5,"NX":2,"NY":3,"SpaceX":0.1875,"SpaceY":0,"width":4,"height":3.33,"lPadding":0.20,"tPadding":0.20}{/literal}', '5164', 'Avery', NULL, 0, 6, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery 8600'{/localize}, '{literal}{"paper-size":"letter","orientation":"portrait","font-name":"helvetica","font-size":8,"font-style":"","metric":"mm","lMargin":7.1,"tMargin":19,"NX":3,"NY":10,"SpaceX":9.5,"SpaceY":3.1,"width":66.6,"height":25.4,"lPadding":5.08,"tPadding":5.08}{/literal}', '8600', 'Avery', NULL, 0, 7, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery L7160'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.28,"tMargin":0.6,"NX":3,"NY":7,"SpaceX":0.1,"SpaceY":0,"width":2.5,"height":1.5,"lPadding":0.20,"tPadding":0.20}{/literal}', 'L7160', 'Avery', NULL, 0, 8, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery L7161'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.28,"tMargin":0.35,"NX":3,"NY":6,"SpaceX":0.1,"SpaceY":0,"width":2.5,"height":1.83,"lPadding":0.20,"tPadding":0.20}{/literal}', 'L7161', 'Avery', NULL, 0, 9, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), + (@option_group_id_label, {localize}'Avery L7162'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.18,"tMargin":0.51,"NX":2,"NY":8,"SpaceX":0.1,"SpaceY":0,"width":3.9,"height":1.33,"lPadding":0.20,"tPadding":0.20}{/literal}', 'L7162', 'Avery', NULL, 0, 10, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL), (@option_group_id_label, {localize}'Avery L7163'{/localize}, '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.18,"tMargin":0.6,"NX":2,"NY":7,"SpaceX":0.1,"SpaceY":0,"width":3.9,"height":1.5,"lPadding":0.20,"tPadding":0.20}{/literal}', 'L7163', 'Avery', NULL, 0, 11, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL); diff --git a/CRM/Upgrade/Incremental/sql/3.4.3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.3.mysql.tpl index f75e44a297..e79b2504cd 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.3.mysql.tpl @@ -9,7 +9,7 @@ INSERT INTO civicrm_uf_group VALUES ( 'on_behalf_organization', 'Contact,Organization,Contribution,Membership', {localize}'{ts escape="sql"}On Behalf Of Organization{/ts}'{/localize}, 1 ); - + SELECT @uf_group_id_onBehalfOrganization := max(id) from civicrm_uf_group where name = 'on_behalf_organization'; INSERT INTO civicrm_uf_join @@ -19,26 +19,26 @@ VALUES ( 1, 'Profile', NULL, NULL, 7, @uf_group_id_onBehalfOrganization ); SELECT @maxId := id FROM civicrm_location_type WHERE name = 'Main'; - + INSERT INTO civicrm_uf_field ( uf_group_id, field_name, is_required, is_reserved, weight, visibility, in_selector, is_searchable, location_type_id, {localize field='label'}label{/localize}, field_type, {localize field='help_post'}help_post{/localize}, phone_type_id ) VALUES - ( @uf_group_id_onBehalfOrganization, 'organization_name', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, + ( @uf_group_id_onBehalfOrganization, 'organization_name', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, {localize}'Organization Name'{/localize}, 'Organization', {localize}NULL{/localize}, NULL ), - ( @uf_group_id_onBehalfOrganization, 'phone', 1, 0, 2, 'User and User Admin Only', 0, 0, @maxId, + ( @uf_group_id_onBehalfOrganization, 'phone', 1, 0, 2, 'User and User Admin Only', 0, 0, @maxId, {localize}'Phone (Main) '{/localize}, 'Contact', {localize}NULL{/localize}, 1 ), - ( @uf_group_id_onBehalfOrganization, 'email', 1, 0, 3, 'User and User Admin Only', 0, 0, @maxId, + ( @uf_group_id_onBehalfOrganization, 'email', 1, 0, 3, 'User and User Admin Only', 0, 0, @maxId, {localize}'Email (Main) '{/localize}, 'Contact', {localize}NULL{/localize}, NULL ), - ( @uf_group_id_onBehalfOrganization, 'street_address', 1, 0, 4, 'User and User Admin Only', 0, 0, @maxId, + ( @uf_group_id_onBehalfOrganization, 'street_address', 1, 0, 4, 'User and User Admin Only', 0, 0, @maxId, {localize}'Street Address'{/localize}, 'Contact', {localize}NULL{/localize}, NULL ), - ( @uf_group_id_onBehalfOrganization, 'city', 1, 0, 5, 'User and User Admin Only', 0, 0, @maxId, + ( @uf_group_id_onBehalfOrganization, 'city', 1, 0, 5, 'User and User Admin Only', 0, 0, @maxId, {localize}'City'{/localize}, 'Contact', {localize}NULL{/localize}, NULL ), ( @uf_group_id_onBehalfOrganization, 'postal_code', 1, 0, 6, 'User and User Admin Only', 0, 0, @maxId, {localize}'Postal Code'{/localize}, 'Contact', {localize}NULL{/localize}, NULL ), ( @uf_group_id_onBehalfOrganization, 'country', 1, 0, 7, 'User and User Admin Only', 0, 0, @maxId, {localize}'Country'{/localize}, 'Contact', {localize}NULL{/localize}, NULL ), - ( @uf_group_id_onBehalfOrganization, 'state_province', 1, 0, 8, 'User and User Admin Only', 0, 0, @maxId, + ( @uf_group_id_onBehalfOrganization, 'state_province', 1, 0, 8, 'User and User Admin Only', 0, 0, @maxId, {localize}'State / Province'{/localize}, 'Contact', {localize}NULL{/localize}, NULL ); -- CRM-8150 @@ -56,10 +56,10 @@ CREATE TABLE IF NOT EXISTS `civicrm_action_mapping` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -INSERT INTO civicrm_action_mapping - (entity, entity_value, entity_value_label, entity_status, entity_status_label, entity_date_start, entity_date_end, entity_recipient) +INSERT INTO civicrm_action_mapping + (entity, entity_value, entity_value_label, entity_status, entity_status_label, entity_date_start, entity_date_end, entity_recipient) VALUES - ('civicrm_activity', 'activity_type', 'Type', 'activity_status', 'Status', 'activity_date_time', NULL, 'activity_contacts'); + ('civicrm_activity', 'activity_type', 'Type', 'activity_status', 'Status', 'activity_date_time', NULL, 'activity_contacts'); CREATE TABLE IF NOT EXISTS `civicrm_action_schedule` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -108,8 +108,8 @@ SELECT @act_weight := MAX(weight) FROM civicrm_option_value WHERE optio -- CRM-8209 SELECT @option_group_id_adv_search_opts := max(id) from civicrm_option_group where name = 'advanced_search_options'; -INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, visibility_id) +INSERT INTO civicrm_option_value + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, visibility_id) VALUES (@option_group_id_aco, {localize}'{ts escape="sql"}Activity Assignees{/ts}'{/localize}, 1, 'Activity Assignees', NULL, 0, NULL, 1, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL), (@option_group_id_aco, {localize}'{ts escape="sql"}Activity Source{/ts}'{/localize}, 2, 'Activity Source', NULL, 0, NULL, 2, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL), diff --git a/CRM/Upgrade/Incremental/sql/3.4.5.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.5.mysql.tpl index 85a1233d09..dd7715455d 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.5.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.5.mysql.tpl @@ -25,14 +25,14 @@ ALTER TABLE `civicrm_action_log` CHANGE `repetition_number` `repetition_number` UPDATE civicrm_mailing SET domain_id = {$domainID} WHERE domain_id IS NULL; -- CRM-8402, CRM-8679 -DELETE et2.* from civicrm_entity_tag et1 +DELETE et2.* from civicrm_entity_tag et1 INNER JOIN civicrm_entity_tag et2 ON et1.entity_table = et2.entity_table AND et1.entity_id = et2.entity_id AND et1.tag_id = et2.tag_id WHERE et1.id < et2.id; -ALTER TABLE civicrm_entity_tag +ALTER TABLE civicrm_entity_tag DROP INDEX index_entity; -ALTER TABLE civicrm_entity_tag +ALTER TABLE civicrm_entity_tag ADD UNIQUE INDEX UI_entity_id_entity_table_tag_id( entity_table, entity_id, tag_id ); -- CRM-8513 @@ -58,19 +58,19 @@ INSERT INTO civicrm_option_value (@report_template_gid, {localize}'Pledge Summary Report'{/localize}, 'pledge/summary', 'CRM_Report_Form_Pledge_Summary', @weight := @weight + 1, {localize}'Pledge Summary Report.'{/localize}, 1, @pledgeCompId); -- CRM-8519 -UPDATE civicrm_payment_processor -SET `url_site` = 'https://sec.paymentexpress.com/pxpay/pxpay.aspx' -WHERE `url_site` = 'https://www.paymentexpress.com/pxpay/pxpay.aspx' +UPDATE civicrm_payment_processor +SET `url_site` = 'https://sec.paymentexpress.com/pxpay/pxpay.aspx' +WHERE `url_site` = 'https://www.paymentexpress.com/pxpay/pxpay.aspx' OR url_site = 'https://sec2.paymentexpress.com/pxpay/pxpay.aspx'; -UPDATE civicrm_payment_processor -SET `url_site` = 'https://sec.paymentexpress.com/pxpay/pxaccess.aspx' -WHERE `url_site` = 'https://www.paymentexpress.com/pxpay/pxaccess.aspx' +UPDATE civicrm_payment_processor +SET `url_site` = 'https://sec.paymentexpress.com/pxpay/pxaccess.aspx' +WHERE `url_site` = 'https://www.paymentexpress.com/pxpay/pxaccess.aspx' OR url_site = 'https://sec2.paymentexpress.com/pxpay/pxpay/pxaccess.aspx'; UPDATE civicrm_payment_processor_type SET url_site_default = 'https://sec.paymentexpress.com/pxpay/pxaccess.aspx', - url_site_test_default = 'https://sec.paymentexpress.com/pxpay/pxaccess.aspx' + url_site_test_default = 'https://sec.paymentexpress.com/pxpay/pxaccess.aspx' WHERE name = 'Payment_Express'; diff --git a/CRM/Upgrade/Incremental/sql/3.4.6.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.6.mysql.tpl index 1d3eb0d078..d959bfd1d1 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.6.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.6.mysql.tpl @@ -27,7 +27,7 @@ SELECT @ogrID := max(id) from civicrm_option_group where name = 'repor SELECT @contributeCompId := max(id) FROM civicrm_component where name = 'CiviContribute'; SELECT @max_weight := MAX(ROUND(weight)) from civicrm_option_value WHERE option_group_id = @ogrID; INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'}description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'}description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) VALUES (@ogrID , {localize}'{ts escape="sql"}Contribution History By Relationship Report{/ts}'{/localize}, 'contribute/history', 'CRM_Report_Form_Contribute_History', NULL, 0, 0, @max_weight+1, {localize}'{ts escape="sql"}List contact\'s donation history, grouped by year, along with contributions attributed to any of the contact\'s related contacts.{/ts}'{/localize}, 0, 0, 1, @contributeCompId, NULL); @@ -55,7 +55,7 @@ ALTER TABLE `civicrm_prevnext_cache` ALTER TABLE `civicrm_price_set` ADD `contribution_type_id` int(10) unsigned default NULL COMMENT 'Conditional foreign key to civicrm_contribution_type.id.', ADD CONSTRAINT `FK_civicrm_price_set_contribution_type_id` FOREIGN KEY (`contribution_type_id`) REFERENCES `civicrm_contribution_type` (`id`) ON DELETE SET NULL; - + ALTER TABLE `civicrm_price_field_value` ADD `membership_type_id` int(10) unsigned default NULL COMMENT 'Conditional foreign key to civicrm_membership_type.id.', ADD CONSTRAINT `FK_civicrm_price_field_value_membership_type_id` FOREIGN KEY (`membership_type_id`) REFERENCES `civicrm_membership_type` (`id`) ON DELETE SET NULL; @@ -65,7 +65,7 @@ SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_i INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( {$domainID}, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql" skip="true"}New Price Set{/ts}', 'New Price Set', 'access CiviMember,administer CiviCRM', '', @customizeID, '1', NULL, @extensionsWeight ), ( {$domainID}, 'civicrm/admin/price&reset=1', '{ts escape="sql" skip="true"}Manage Price Sets{/ts}', 'Manage Price Sets', 'access CiviMember,administer CiviCRM', '', @customizeID, '1', NULL, @extensionsWeight+1 ); @@ -74,10 +74,10 @@ SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_i INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( {$domainID}, 'civicrm/admin/price&reset=1&action=add', '{ts escape="sql" skip="true"}New Price Set{/ts}', 'New Price Set', 'access CiviMember,administer CiviCRM', '', @customizeID, '1', NULL, @extensionsWeight ), ( {$domainID}, 'civicrm/admin/price&reset=1', '{ts escape="sql" skip="true"}Manage Price Sets{/ts}', 'Manage Price Sets', 'access CiviMember,administer CiviCRM', '', @customizeID, '1', NULL, @extensionsWeight+1 ); - + -- CRM-8626 UPDATE civicrm_payment_processor_type diff --git a/CRM/Upgrade/Incremental/sql/3.4.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.alpha1.mysql.tpl index f16d3c4292..4ac3f735b5 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.alpha1.mysql.tpl @@ -49,9 +49,9 @@ CREATE TABLE civicrm_mailing_recipients ( contact_id int unsigned NOT NULL COMMENT 'FK to Contact', email_id int unsigned NOT NULL COMMENT 'FK to Email', PRIMARY KEY ( id ), - CONSTRAINT FK_civicrm_mailing_recipients_mailing_id FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id) ON DELETE CASCADE, - CONSTRAINT FK_civicrm_mailing_recipients_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, - CONSTRAINT FK_civicrm_mailing_recipients_email_id FOREIGN KEY (email_id) REFERENCES civicrm_email(id) ON DELETE CASCADE + CONSTRAINT FK_civicrm_mailing_recipients_mailing_id FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id) ON DELETE CASCADE, + CONSTRAINT FK_civicrm_mailing_recipients_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, + CONSTRAINT FK_civicrm_mailing_recipients_email_id FOREIGN KEY (email_id) REFERENCES civicrm_email(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; @@ -65,11 +65,11 @@ INSERT INTO civicrm_option_value (@option_group_id_report, {localize}'Contribute Logging Report (Detail)'{/localize}, 'logging/contribute/detail', 'CRM_Report_Form_Contribute_LoggingDetail', @weight := @weight + 1, {localize}'Contribute modification report for the logging infrastructure (detail).'{/localize}, 0, @contributeCompId); -- CRM-7297 Membership Upsell -ALTER TABLE civicrm_membership_log ADD membership_type_id INT UNSIGNED COMMENT 'FK to Membership Type.', -ADD CONSTRAINT FK_civicrm_membership_log_membership_type_id FOREIGN KEY (membership_type_id) REFERENCES civicrm_membership_type(id) +ALTER TABLE civicrm_membership_log ADD membership_type_id INT UNSIGNED COMMENT 'FK to Membership Type.', +ADD CONSTRAINT FK_civicrm_membership_log_membership_type_id FOREIGN KEY (membership_type_id) REFERENCES civicrm_membership_type(id) ON DELETE SET NULL; -UPDATE civicrm_membership_log cml INNER JOIN civicrm_membership cm +UPDATE civicrm_membership_log cml INNER JOIN civicrm_membership cm ON cml.membership_id=cm.id SET cml.membership_type_id=cm.membership_type_id; -- CRM-7445 add client to case @@ -99,10 +99,10 @@ ADD `created_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_contact, w ADD CONSTRAINT FK_civicrm_tag_created_id FOREIGN KEY (created_id) REFERENCES civicrm_contact(id) ON DELETE SET NULL; -- CRM-7494 - UPDATE civicrm_option_value value + UPDATE civicrm_option_value value INNER JOIN civicrm_option_group grp ON ( grp.id = value.option_group_id ) SET value.name = 'CRM_Report_Form_Walklist_Walklist' - WHERE grp.name = 'report_template' + WHERE grp.name = 'report_template' AND value.name = 'CRM_Report_Form_Walklist'; SELECT @reportlastID := MAX(id) FROM civicrm_navigation where name = 'Reports'; @@ -112,15 +112,15 @@ SELECT @reportOptValMaxWt := MAX(ROUND(weight)) FROM civicrm_option_value WHERE SELECT @nav_max_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @reportlastID; INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) + (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight,{localize field='description'} description{/localize}, is_optgroup,is_reserved, is_active, component_id, visibility_id ) VALUES (@reportOptGrpId, {localize}'{ts escape="sql"}Walk List Survey Report{/ts}'{/localize}, 'survey/detail', 'CRM_Report_Form_Campaign_SurveyDetails', NULL, 0, 0, @reportOptValMaxWt+1, {localize}'{ts escape="sql"}Provides a detailed report for your walk list survey{/ts}'{/localize}, 0, 0, 1, @campaignCompId, NULL ); INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -VALUES +VALUES ( {$domainID}, 'Walk List Survey Report', 'survey/detail', 'Provides a detailed report for your walk list survey', 'access CiviReport', '{literal}a:39:{s:6:"fields";a:3:{s:12:"display_name";s:1:"1";s:9:"survey_id";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:52:"Provides a detailed report for your walk list survey";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}{/literal}'); - + SET @instanceID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) diff --git a/CRM/Upgrade/Incremental/sql/3.4.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.alpha2.mysql.tpl index 2be2f2da4c..8cf5368e69 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.alpha2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.alpha2.mysql.tpl @@ -1,14 +1,14 @@ -- CRM-7494 -- update navigation. -UPDATE civicrm_navigation +UPDATE civicrm_navigation SET name = 'Survey Report (Detail)', label = 'Survey Report (Detail)' WHERE name LIKE 'Walk List Survey Report'; -- update report instance. -UPDATE civicrm_report_instance +UPDATE civicrm_report_instance SET title = 'Survey Report (Detail)', description = 'Detailed report for canvassing, phone-banking, walk lists or other surveys.' WHERE report_id LIKE 'survey/detail'; @@ -22,7 +22,7 @@ UPDATE civicrm_report_instance INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id ) SET val.label_{$loc} = '{ts escape="sql"}Survey Report (Detail){/ts}', val.description_{$loc} = '{ts escape="sql"}Detailed report for canvassing, phone-banking, walk lists or other surveys.{/ts}' - WHERE val.name = 'CRM_Report_Form_Campaign_SurveyDetails' + WHERE val.name = 'CRM_Report_Form_Campaign_SurveyDetails' AND grp.name = 'report_template'; {/foreach} @@ -33,7 +33,7 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id ) INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id ) SET val.label = '{ts escape="sql"}Survey Report (Detail){/ts}', val.description = '{ts escape="sql"}Detailed report for canvassing, phone-banking, walk lists or other surveys.{/ts}' - WHERE val.name = 'CRM_Report_Form_Campaign_SurveyDetails' + WHERE val.name = 'CRM_Report_Form_Campaign_SurveyDetails' AND grp.name = 'report_template'; {/if} @@ -46,12 +46,12 @@ DROP TABLE IF EXISTS civicrm_openid_nonces; SELECT @option_group_id_eventBadge := max(id) from civicrm_option_group where name = 'event_badge'; {if $multilingual} INSERT INTO civicrm_option_value - (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, weight, is_active, component_id ) + (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, weight, is_active, component_id ) VALUES (@option_group_id_eventBadge , {foreach from=$locales item=locale}'5395 with Logo', 'Avery 5395 compatible labels with logo (4 up by 2, 59.2mm x 85.7mm)', {/foreach} '4', 'CRM_Event_Badge_Logo5395', 1, 1, NULL ); {else} INSERT INTO civicrm_option_value - (option_group_id, label, description, value, name, weight, is_active, component_id ) + (option_group_id, label, description, value, name, weight, is_active, component_id ) VALUES (@option_group_id_eventBadge , '{ts escape="sql"}5395 with Logo{/ts}', '{ts escape="sql"}Avery 5395 compatible labels with logo (4 up by 2, 59.2mm x 85.7mm){/ts}', '4', 'CRM_Event_Badge_Logo5395', 1, 1, NULL ); {/if} diff --git a/CRM/Upgrade/Incremental/sql/3.4.alpha3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.alpha3.mysql.tpl index 3c3357baf3..d3472467bc 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.alpha3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.alpha3.mysql.tpl @@ -8,7 +8,7 @@ SELECT @weight := MAX(weight) FROM civicrm_option_value WHERE op SELECT @contributeCompId := MAX(id) FROM civicrm_component WHERE name = 'CiviContribute'; INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, weight, {localize field='description'}description{/localize}, is_active, component_id) + (option_group_id, {localize field='label'}label{/localize}, value, name, weight, {localize field='description'}description{/localize}, is_active, component_id) VALUES (@option_group_id_report, {localize}'Personal Campaign Page Report'{/localize}, 'contribute/pcp', 'CRM_Report_Form_Contribute_PCP', @weight := @weight + 1, {localize}'Shows Personal Campaign Page Report.'{/localize}, 1, @contributeCompId ); @@ -22,6 +22,6 @@ ADD `engagement_level` int(10) unsigned default NULL COMMENT 'Assign a specific {/if} -- CRM-7453 - UPDATE `civicrm_navigation` + UPDATE `civicrm_navigation` SET `url` = 'civicrm/activity/email/add&atype=3&action=add&reset=1&context=standalone' WHERE `name` = 'New Email'; diff --git a/CRM/Upgrade/Incremental/sql/3.4.beta2.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.beta2.mysql.tpl index be233117d1..a309b2170f 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.beta2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.beta2.mysql.tpl @@ -10,5 +10,5 @@ SELECT @nav_case_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE pare INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( @domain_id, 'civicrm/admin/options/encounter_medium&group=encounter_medium&reset=1', '{ts escape="sql"}Encounter Medium{/ts}','Encounter Medium', 'administer CiviCase', NULL, @nav_case, '1', NULL, @nav_case_weight+1 ); + ( @domain_id, 'civicrm/admin/options/encounter_medium&group=encounter_medium&reset=1', '{ts escape="sql"}Encounter Medium{/ts}','Encounter Medium', 'administer CiviCase', NULL, @nav_case, '1', NULL, @nav_case_weight+1 ); diff --git a/CRM/Upgrade/Incremental/sql/3.4.beta3.mysql.tpl b/CRM/Upgrade/Incremental/sql/3.4.beta3.mysql.tpl index cb0aad9c7e..0be4d11637 100644 --- a/CRM/Upgrade/Incremental/sql/3.4.beta3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/3.4.beta3.mysql.tpl @@ -7,7 +7,7 @@ VALUES SELECT @optGrpIdEngagementIndex := max(id) from civicrm_option_group where name = 'engagement_index'; -INSERT INTO civicrm_option_value +INSERT INTO civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, is_optgroup, is_reserved, is_active, component_id, visibility_id) VALUES (@optGrpIdEngagementIndex, {localize}'{ts escape="sql"}1{/ts}'{/localize}, 1, 1, NULL, 0, NULL, 1, 0, 0, 1, NULL, NULL), diff --git a/CRM/Upgrade/Incremental/sql/4.1.0.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.1.0.mysql.tpl index a803b1074a..1210bad37b 100644 --- a/CRM/Upgrade/Incremental/sql/4.1.0.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.1.0.mysql.tpl @@ -1,6 +1,5 @@ {if $multilingual} - {foreach from=$locales item=locale} ALTER TABLE civicrm_pcp_block ADD link_text_{$locale} varchar(255); UPDATE civicrm_pcp_block SET link_text_{$locale} = link_text; diff --git a/CRM/Upgrade/Incremental/sql/4.1.2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.1.2.mysql.tpl index a6c2ec88ea..1a2923e247 100644 --- a/CRM/Upgrade/Incremental/sql/4.1.2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.1.2.mysql.tpl @@ -6,7 +6,7 @@ SELECT @clientCaseValue := value FROM civicrm_option_value WHERE name = 'Add UPDATE civicrm_option_value SET value = @maxValue + 1 WHERE name = 'Add Client To Case' AND option_group_id = @option_group_id_act; -UPDATE civicrm_activity +UPDATE civicrm_activity INNER JOIN civicrm_case_activity ON civicrm_activity.id = civicrm_case_activity.activity_id SET civicrm_activity.activity_type_id = @maxValue + 1 WHERE civicrm_activity.activity_type_id = @clientCaseValue; diff --git a/CRM/Upgrade/Incremental/sql/4.1.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.1.alpha1.mysql.tpl index d7db803ca1..2a327efa7c 100644 --- a/CRM/Upgrade/Incremental/sql/4.1.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.1.alpha1.mysql.tpl @@ -1,6 +1,6 @@ {include file='../CRM/Upgrade/4.1.alpha1.msg_template/civicrm_msg_template.tpl'} --- get domain id +-- get domain id SELECT @domainID := min(id) FROM civicrm_domain; -- CRM-8356 @@ -22,7 +22,7 @@ INSERT INTO civicrm_state_province (`name`, `abbreviation`, `country_id`) VALUES ('Metropolitan Manila' , 'MNL', '1170'); - + -- CRM-8902 UPDATE civicrm_navigation SET permission ='add cases,access all cases and activities', permission_operator = 'OR' WHERE civicrm_navigation.name= 'New Case'; @@ -67,7 +67,7 @@ VALUES -- CRM-8739 Update civicrm_menu set title = 'Cleanup Caches and Update Paths' where path = 'civicrm/admin/setting/updateConfigBackend'; - + -- CRM-8855 SELECT @option_group_id_udOpt := max(id) from civicrm_option_group where name = 'user_dashboard_options'; SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_udOpt; @@ -88,9 +88,9 @@ ALTER TABLE `civicrm_contact` CHANGE `contact_sub_type` `contact_sub_type` VARCH UPDATE civicrm_contact SET contact_sub_type = CONCAT('', contact_sub_type, ''); -- CRM-6811 -INSERT INTO `civicrm_dashboard` - ( `domain_id`, {localize field='label'}`label`{/localize}, `url`, `permission`, `permission_operator`, `column_no`, `is_minimized`, `is_active`, `weight`, `fullscreen_url`, `is_fullscreen`, `is_reserved`) - VALUES +INSERT INTO `civicrm_dashboard` + ( `domain_id`, {localize field='label'}`label`{/localize}, `url`, `permission`, `permission_operator`, `column_no`, `is_minimized`, `is_active`, `weight`, `fullscreen_url`, `is_fullscreen`, `is_reserved`) + VALUES ( @domainID, {localize}'Case Dashboard Dashlet'{/localize}, 'civicrm/dashlet/casedashboard&reset=1&snippet=4', 'access CiviCase', NULL , 0, 0, 1, 4, 'civicrm/dashlet/casedashboard&reset=1&snippet=4&context=dashletFullscreen', 1, 1); -- CRM-9059 Admin menu rebuild @@ -119,53 +119,53 @@ DELETE FROM civicrm_navigation WHERE name = 'Administration Console'; INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, 'civicrm/admin&reset=1', '{ts escape="sql" skip="true"}Administration Console{/ts}', 'Administration Console', 'administer CiviCRM', '', @adminlastID, '1', NULL, 1 ); SET @adminConsolelastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, 'civicrm/admin/configtask&reset=1', '{ts escape="sql" skip="true"}Configuration Checklist{/ts}', 'Configuration Checklist', 'administer CiviCRM', '', @adminConsolelastID, '1', NULL, 1 ); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, NULL, '{ts escape="sql" skip="true"}Customize Data and Screens{/ts}', 'Customize Data and Screens', 'administer CiviCRM', '', @adminlastID, '1', NULL, 3 ); SET @CustomizelastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( @domainID, 'civicrm/admin/custom/group&reset=1', '{ts escape="sql" skip="true"}Custom Fields{/ts}', 'Custom Fields', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 1 ), - ( @domainID, 'civicrm/admin/uf/group&reset=1', '{ts escape="sql" skip="true"}Profiles{/ts}', 'Profiles', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 2 ), - ( @domainID, 'civicrm/admin/tag&reset=1', '{ts escape="sql" skip="true"}Tags (Categories){/ts}', 'Tags (Categories)', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 3 ), - ( @domainID, 'civicrm/admin/options/activity_type&reset=1&group=activity_type', '{ts escape="sql" skip="true"}Activity Types{/ts}', 'Activity Types', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 4 ), - ( @domainID, 'civicrm/admin/reltype&reset=1', '{ts escape="sql" skip="true"}Relationship Types{/ts}', 'Relationship Types', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 5 ), + ( @domainID, 'civicrm/admin/custom/group&reset=1', '{ts escape="sql" skip="true"}Custom Fields{/ts}', 'Custom Fields', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 1 ), + ( @domainID, 'civicrm/admin/uf/group&reset=1', '{ts escape="sql" skip="true"}Profiles{/ts}', 'Profiles', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 2 ), + ( @domainID, 'civicrm/admin/tag&reset=1', '{ts escape="sql" skip="true"}Tags (Categories){/ts}', 'Tags (Categories)', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 3 ), + ( @domainID, 'civicrm/admin/options/activity_type&reset=1&group=activity_type', '{ts escape="sql" skip="true"}Activity Types{/ts}', 'Activity Types', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 4 ), + ( @domainID, 'civicrm/admin/reltype&reset=1', '{ts escape="sql" skip="true"}Relationship Types{/ts}', 'Relationship Types', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 5 ), ( @domainID, 'civicrm/admin/options/subtype&reset=1', '{ts escape="sql" skip="true"}Contact Types{/ts}','Contact Types', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 6 ), - ( @domainID, 'civicrm/admin/setting/preferences/display&reset=1', '{ts escape="sql" skip="true"}Display Preferences{/ts}', 'Display Preferences', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 9 ), - ( @domainID, 'civicrm/admin/setting/search&reset=1', '{ts escape="sql" skip="true"}Search Preferences{/ts}', 'Search Preferences', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 10 ), - ( @domainID, 'civicrm/admin/menu&reset=1', '{ts escape="sql" skip="true"}Navigation Menu{/ts}', 'Navigation Menu', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 11 ), + ( @domainID, 'civicrm/admin/setting/preferences/display&reset=1', '{ts escape="sql" skip="true"}Display Preferences{/ts}', 'Display Preferences', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 9 ), + ( @domainID, 'civicrm/admin/setting/search&reset=1', '{ts escape="sql" skip="true"}Search Preferences{/ts}', 'Search Preferences', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 10 ), + ( @domainID, 'civicrm/admin/menu&reset=1', '{ts escape="sql" skip="true"}Navigation Menu{/ts}', 'Navigation Menu', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 11 ), ( @domainID, 'civicrm/admin/options/wordreplacements&reset=1','{ts escape="sql" skip="true"}Word Replacements{/ts}','Word Replacements', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 12 ), ( @domainID, 'civicrm/admin/options/custom_search&reset=1&group=custom_search', '{ts escape="sql" skip="true"}Manage Custom Searches{/ts}', 'Manage Custom Searches', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 13 ), ( @domainID, 'civicrm/admin/extensions&reset=1', '{ts escape="sql" skip="true"}Manage Extensions{/ts}', 'Manage Extensions', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 14 ); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, NULL, '{ts escape="sql" skip="true"}Dropdown Options{/ts}', 'Dropdown Options', 'administer CiviCRM', '', @CustomizelastID, '1', NULL, 8 ); SET @optionListlastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES - ( @domainID, 'civicrm/admin/options/gender&reset=1&group=gender', '{ts escape="sql" skip="true"}Gender Options{/ts}', 'Gender Options', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 1 ), - ( @domainID, 'civicrm/admin/options/individual_prefix&group=individual_prefix&reset=1', '{ts escape="sql" skip="true"}Individual Prefixes (Ms, Mr...){/ts}', 'Individual Prefixes (Ms, Mr...)', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 2 ), - ( @domainID, 'civicrm/admin/options/individual_suffix&group=individual_suffix&reset=1', '{ts escape="sql" skip="true"}Individual Suffixes (Jr, Sr...){/ts}', 'Individual Suffixes (Jr, Sr...)', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 3 ), - ( @domainID, 'civicrm/admin/options/instant_messenger_service&group=instant_messenger_service&reset=1', '{ts escape="sql" skip="true"}Instant Messenger Services{/ts}', 'Instant Messenger Services', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 4 ), - ( @domainID, 'civicrm/admin/locationType&reset=1', '{ts escape="sql" skip="true"}Location Types (Home, Work...){/ts}', 'Location Types (Home, Work...)', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 5 ), - ( @domainID, 'civicrm/admin/options/mobile_provider&group=mobile_provider&reset=1', '{ts escape="sql" skip="true"}Mobile Phone Providers{/ts}', 'Mobile Phone Providers', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 6 ), - ( @domainID, 'civicrm/admin/options/phone_type&group=phone_type&reset=1', '{ts escape="sql" skip="true"}Phone Types{/ts}', 'Phone Types', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 7 ), +VALUES + ( @domainID, 'civicrm/admin/options/gender&reset=1&group=gender', '{ts escape="sql" skip="true"}Gender Options{/ts}', 'Gender Options', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 1 ), + ( @domainID, 'civicrm/admin/options/individual_prefix&group=individual_prefix&reset=1', '{ts escape="sql" skip="true"}Individual Prefixes (Ms, Mr...){/ts}', 'Individual Prefixes (Ms, Mr...)', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 2 ), + ( @domainID, 'civicrm/admin/options/individual_suffix&group=individual_suffix&reset=1', '{ts escape="sql" skip="true"}Individual Suffixes (Jr, Sr...){/ts}', 'Individual Suffixes (Jr, Sr...)', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 3 ), + ( @domainID, 'civicrm/admin/options/instant_messenger_service&group=instant_messenger_service&reset=1', '{ts escape="sql" skip="true"}Instant Messenger Services{/ts}', 'Instant Messenger Services', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 4 ), + ( @domainID, 'civicrm/admin/locationType&reset=1', '{ts escape="sql" skip="true"}Location Types (Home, Work...){/ts}', 'Location Types (Home, Work...)', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 5 ), + ( @domainID, 'civicrm/admin/options/mobile_provider&group=mobile_provider&reset=1', '{ts escape="sql" skip="true"}Mobile Phone Providers{/ts}', 'Mobile Phone Providers', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 6 ), + ( @domainID, 'civicrm/admin/options/phone_type&group=phone_type&reset=1', '{ts escape="sql" skip="true"}Phone Types{/ts}', 'Phone Types', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 7 ), ( @domainID, 'civicrm/admin/options/website_type&group=website_type&reset=1', '{ts escape="sql" skip="true"}Website Types{/ts}', 'Website Types', 'administer CiviCRM', '', @optionListlastID, '1', NULL, 8 ); INSERT INTO civicrm_navigation @@ -176,41 +176,41 @@ VALUES SET @communicationslastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES - ( @domainID, 'civicrm/admin/domain&action=update&reset=1', '{ts escape="sql" skip="true"}Organization Address and Contact Info{/ts}', 'Organization Address and Contact Info', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 1 ), - ( @domainID, 'civicrm/admin/options/from_email_address&group=from_email_address&reset=1', '{ts escape="sql" skip="true"}FROM Email Addresses{/ts}', 'FROM Email Addresses', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 2 ), - ( @domainID, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql" skip="true"}Message Templates{/ts}', 'Message Templates', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 3 ), +VALUES + ( @domainID, 'civicrm/admin/domain&action=update&reset=1', '{ts escape="sql" skip="true"}Organization Address and Contact Info{/ts}', 'Organization Address and Contact Info', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 1 ), + ( @domainID, 'civicrm/admin/options/from_email_address&group=from_email_address&reset=1', '{ts escape="sql" skip="true"}FROM Email Addresses{/ts}', 'FROM Email Addresses', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 2 ), + ( @domainID, 'civicrm/admin/messageTemplates&reset=1', '{ts escape="sql" skip="true"}Message Templates{/ts}', 'Message Templates', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 3 ), ( @domainID, 'civicrm/admin/scheduleReminders&reset=1', '{ts escape="sql" skip="true"}Schedule Reminders{/ts}', 'Schedule Reminders', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 4 ), ( @domainID, 'civicrm/admin/options/preferred_communication_method&group=preferred_communication_method&reset=1', '{ts escape="sql" skip="true"}Preferred Communication Methods{/ts}', 'Preferred Communication Methods', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 5 ), ( @domainID, 'civicrm/admin/labelFormats&reset=1', '{ts escape="sql" skip="true"}Label Formats{/ts}', 'Label Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 6 ), - ( @domainID, 'civicrm/admin/pdfFormats&reset=1', '{ts escape="sql" skip="true"}Print Page (PDF) Formats{/ts}', 'Print Page (PDF) Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 7 ), - ( @domainID, 'civicrm/admin/options/email_greeting&group=email_greeting&reset=1', '{ts escape="sql" skip="true"}Email Greeting Formats{/ts}', 'Email Greeting Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 8 ), - ( @domainID, 'civicrm/admin/options/postal_greeting&group=postal_greeting&reset=1', '{ts escape="sql" skip="true"}Postal Greeting Formats{/ts}', 'Postal Greeting Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 9 ), + ( @domainID, 'civicrm/admin/pdfFormats&reset=1', '{ts escape="sql" skip="true"}Print Page (PDF) Formats{/ts}', 'Print Page (PDF) Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 7 ), + ( @domainID, 'civicrm/admin/options/email_greeting&group=email_greeting&reset=1', '{ts escape="sql" skip="true"}Email Greeting Formats{/ts}', 'Email Greeting Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 8 ), + ( @domainID, 'civicrm/admin/options/postal_greeting&group=postal_greeting&reset=1', '{ts escape="sql" skip="true"}Postal Greeting Formats{/ts}', 'Postal Greeting Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 9 ), ( @domainID, 'civicrm/admin/options/addressee&group=addressee&reset=1', '{ts escape="sql" skip="true"}Addressee Formats{/ts}', 'Addressee Formats', 'administer CiviCRM', '', @communicationslastID, '1', NULL, 10 ); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, NULL, '{ts escape="sql" skip="true"}Localization{/ts}', 'Localization', 'administer CiviCRM', '', @adminlastID, '1', NULL, 6 ); SET @locallastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES - ( @domainID, 'civicrm/admin/setting/localization&reset=1', '{ts escape="sql" skip="true"}Languages, Currency, Location{/ts}', 'Languages, Currency, Locations', 'administer CiviCRM', '', @locallastID, '1', NULL, 1 ), - ( @domainID, 'civicrm/admin/setting/preferences/address&reset=1', '{ts escape="sql" skip="true"}Address Settings{/ts}', 'Address Settings', 'administer CiviCRM', '', @locallastID, '1', NULL, 2 ), +VALUES + ( @domainID, 'civicrm/admin/setting/localization&reset=1', '{ts escape="sql" skip="true"}Languages, Currency, Location{/ts}', 'Languages, Currency, Locations', 'administer CiviCRM', '', @locallastID, '1', NULL, 1 ), + ( @domainID, 'civicrm/admin/setting/preferences/address&reset=1', '{ts escape="sql" skip="true"}Address Settings{/ts}', 'Address Settings', 'administer CiviCRM', '', @locallastID, '1', NULL, 2 ), ( @domainID, 'civicrm/admin/setting/date&reset=1', '{ts escape="sql" skip="true"}Date Format{/ts}', 'Date Formats', 'administer CiviCRM', '', @locallastID, '1', NULL, 3 ), ( @domainID, 'civicrm/admin/options/languages&group=languages&reset=1', '{ts escape="sql" skip="true"}Preferred Language Options{/ts}', 'Preferred Language Options', 'administer CiviCRM', '', @locallastID, '1', NULL, 4 ); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, NULL, '{ts escape="sql" skip="true"}Users and Permissions{/ts}', 'Users and Permissions', 'administer CiviCRM', '', @adminlastID, '1', NULL, 7 ); SET @usersPermslastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, 'civicrm/admin/access&reset=1', '{ts escape="sql" skip="true"}Permissions (Access Control){/ts}', 'Permissions (Access Control)', 'administer CiviCRM', '', @usersPermslastID, '1', NULL, 1 ), ( @domainID, 'civicrm/admin/synchUser&reset=1', '{ts escape="sql" skip="true"}Synchronize Users to Contacts{/ts}', 'Synchronize Users to Contacts', 'administer CiviCRM', '', @usersPermslastID, '1', NULL, 2 ); @@ -223,20 +223,20 @@ SET @systemSettingslastID:=LAST_INSERT_ID(); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( @domainID, 'civicrm/admin/setting/component&reset=1', '{ts escape="sql" skip="true"}Enable CiviCRM Components{/ts}', 'Enable Components', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 1 ), - ( @domainID, 'civicrm/admin/setting/smtp&reset=1', '{ts escape="sql" skip="true"}Outbound Email (SMTP/Sendmail){/ts}', 'Outbound Email', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 2 ), - ( @domainID, 'civicrm/admin/paymentProcessor&reset=1', '{ts escape="sql" skip="true"}Payment Processors{/ts}', 'Payment Processors', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 3 ), - ( @domainID, 'civicrm/admin/setting/mapping&reset=1', '{ts escape="sql" skip="true"}Mapping and Geocoding{/ts}', 'Mapping and Geocoding', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 4 ), - ( @domainID, 'civicrm/admin/setting/misc&reset=1', '{ts escape="sql" skip="true"}Undelete, Logging and ReCAPTCHA{/ts}', 'Undelete, Logging and ReCAPTCHA', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 5 ), - ( @domainID, 'civicrm/admin/setting/path&reset=1', '{ts escape="sql" skip="true"}Directories{/ts}', 'Directories', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 6 ), - ( @domainID, 'civicrm/admin/setting/url&reset=1', '{ts escape="sql" skip="true"}Resource URLs{/ts}', 'Resource URLs', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 7 ), + ( @domainID, 'civicrm/admin/setting/component&reset=1', '{ts escape="sql" skip="true"}Enable CiviCRM Components{/ts}', 'Enable Components', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 1 ), + ( @domainID, 'civicrm/admin/setting/smtp&reset=1', '{ts escape="sql" skip="true"}Outbound Email (SMTP/Sendmail){/ts}', 'Outbound Email', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 2 ), + ( @domainID, 'civicrm/admin/paymentProcessor&reset=1', '{ts escape="sql" skip="true"}Payment Processors{/ts}', 'Payment Processors', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 3 ), + ( @domainID, 'civicrm/admin/setting/mapping&reset=1', '{ts escape="sql" skip="true"}Mapping and Geocoding{/ts}', 'Mapping and Geocoding', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 4 ), + ( @domainID, 'civicrm/admin/setting/misc&reset=1', '{ts escape="sql" skip="true"}Undelete, Logging and ReCAPTCHA{/ts}', 'Undelete, Logging and ReCAPTCHA', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 5 ), + ( @domainID, 'civicrm/admin/setting/path&reset=1', '{ts escape="sql" skip="true"}Directories{/ts}', 'Directories', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 6 ), + ( @domainID, 'civicrm/admin/setting/url&reset=1', '{ts escape="sql" skip="true"}Resource URLs{/ts}', 'Resource URLs', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 7 ), ( @domainID, 'civicrm/admin/setting/updateConfigBackend&reset=1', '{ts escape="sql" skip="true"}Cleanup Caches and Update Paths{/ts}', 'Cleanup Caches and Update Paths', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 8 ), - ( @domainID, 'civicrm/admin/setting/uf&reset=1', '{ts escape="sql" skip="true"}CMS Database Integration{/ts}', 'CMS Integration', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 9 ), - ( @domainID, 'civicrm/admin/options/safe_file_extension&group=safe_file_extension&reset=1', '{ts escape="sql" skip="true"}Safe File Extensions{/ts}', 'Safe File Extensions','administer CiviCRM', '',@systemSettingslastID, '1', NULL, 10 ), - ( @domainID, 'civicrm/admin/options?reset=1', '{ts escape="sql" skip="true"}Option Groups{/ts}', 'Option Groups', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 11 ), - ( @domainID, 'civicrm/admin/mapping&reset=1', '{ts escape="sql" skip="true"}Import/Export Mappings{/ts}', 'Import/Export Mappings', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 12 ), + ( @domainID, 'civicrm/admin/setting/uf&reset=1', '{ts escape="sql" skip="true"}CMS Database Integration{/ts}', 'CMS Integration', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 9 ), + ( @domainID, 'civicrm/admin/options/safe_file_extension&group=safe_file_extension&reset=1', '{ts escape="sql" skip="true"}Safe File Extensions{/ts}', 'Safe File Extensions','administer CiviCRM', '',@systemSettingslastID, '1', NULL, 10 ), + ( @domainID, 'civicrm/admin/options?reset=1', '{ts escape="sql" skip="true"}Option Groups{/ts}', 'Option Groups', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 11 ), + ( @domainID, 'civicrm/admin/mapping&reset=1', '{ts escape="sql" skip="true"}Import/Export Mappings{/ts}', 'Import/Export Mappings', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 12 ), ( @domainID, 'civicrm/admin/setting/debug&reset=1', '{ts escape="sql" skip="true"}Debugging and Error Handling{/ts}','Debugging and Error Handling', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 13 ), - ( @domainID, 'civicrm/admin/setting/preferences/multisite&reset=1', '{ts escape="sql" skip="true"}Multi Site Settings{/ts}', 'Multi Site Settings', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 14 ); + ( @domainID, 'civicrm/admin/setting/preferences/multisite&reset=1', '{ts escape="sql" skip="true"}Multi Site Settings{/ts}', 'Multi Site Settings', 'administer CiviCRM', '', @systemSettingslastID, '1', NULL, 14 ); SELECT @campaignAdminID := id FROM civicrm_navigation where name = 'CiviCampaign' AND parent_id = @adminlastID; SELECT @eventAdminID := id FROM civicrm_navigation where name = 'CiviEvent' AND parent_id = @adminlastID; @@ -247,10 +247,10 @@ INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES ( @domainID, 'civicrm/admin/setting/preferences/campaign&reset=1', '{ts escape="sql" skip="true"}CiviCampaign Component Settings{/ts}', 'CiviCampaign Component Settings','administer CiviCampaign', '', @campaignAdminID, '1', NULL, 5 ), - ( @domainID, 'civicrm/admin/setting/preferences/event&reset=1', '{ts escape="sql" skip="true"}CiviEvent Component Settings{/ts}', 'CiviEvent Component Settings','access CiviEvent,administer CiviCRM', 'AND', @eventAdminID, '1', NULL, 13 ), - ( @domainID, 'civicrm/admin/setting/preferences/mailing&reset=1', '{ts escape="sql" skip="true"}CiviMail Component Settings{/ts}', 'CiviMail Component Settings','access CiviMail,administer CiviCRM', 'AND', @mailAdminID, '1', NULL, 6 ), - ( @domainID, 'civicrm/admin/setting/preferences/member&reset=1', '{ts escape="sql" skip="true"}CiviMember Component Settings{/ts}', 'CiviMember Component Settings','access CiviMember,administer CiviCRM', 'AND', @memberAdminID, '1', NULL, 5 ), - ( @domainID, 'civicrm/admin/options/event_badge&group=event_badge&reset=1', '{ts escape="sql" skip="true"}Event Badge Formats{/ts}', 'Event Badge Formats', 'access CiviEvent,administer CiviCRM', 'AND', @eventAdminID, '1', NULL, 11 ); + ( @domainID, 'civicrm/admin/setting/preferences/event&reset=1', '{ts escape="sql" skip="true"}CiviEvent Component Settings{/ts}', 'CiviEvent Component Settings','access CiviEvent,administer CiviCRM', 'AND', @eventAdminID, '1', NULL, 13 ), + ( @domainID, 'civicrm/admin/setting/preferences/mailing&reset=1', '{ts escape="sql" skip="true"}CiviMail Component Settings{/ts}', 'CiviMail Component Settings','access CiviMail,administer CiviCRM', 'AND', @mailAdminID, '1', NULL, 6 ), + ( @domainID, 'civicrm/admin/setting/preferences/member&reset=1', '{ts escape="sql" skip="true"}CiviMember Component Settings{/ts}', 'CiviMember Component Settings','access CiviMember,administer CiviCRM', 'AND', @memberAdminID, '1', NULL, 5 ), + ( @domainID, 'civicrm/admin/options/event_badge&group=event_badge&reset=1', '{ts escape="sql" skip="true"}Event Badge Formats{/ts}', 'Event Badge Formats', 'access CiviEvent,administer CiviCRM', 'AND', @eventAdminID, '1', NULL, 11 ); -- CRM-9113 ALTER TABLE `civicrm_report_instance` ADD `grouprole` VARCHAR( 1024 ) NULL AFTER `permission`; @@ -327,7 +327,7 @@ ALTER TABLE `civicrm_contribution_recur` ADD CONSTRAINT `FK_civicrm_contribution UPDATE `civicrm_contribution_recur` ccr INNER JOIN `civicrm_contribution` cc ON ccr.id = cc.contribution_recur_id SET ccr.campaign_id = cc.campaign_id, ccr.payment_instrument_id = cc.payment_instrument_id, ccr.contribution_type_id = cc.contribution_type_id; -- CRM-8962 -INSERT INTO civicrm_action_mapping ( entity, entity_value, entity_value_label, entity_status, entity_status_label, entity_date_start, entity_date_end, entity_recipient ) +INSERT INTO civicrm_action_mapping ( entity, entity_value, entity_value_label, entity_status, entity_status_label, entity_date_start, entity_date_end, entity_recipient ) VALUES ('civicrm_participant', 'event_type', 'Event Type', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'), ('civicrm_participant', 'civicrm_event', 'Event Name', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'); @@ -340,27 +340,27 @@ VALUES SELECT @option_group_id_ere := max(id) from civicrm_option_group where name = 'event_contacts'; -INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, filter, weight, is_active ) +INSERT INTO civicrm_option_value + (option_group_id, {localize field='label'}label{/localize}, value, name, filter, weight, is_active ) VALUES (@option_group_id_ere, {localize}'{ts escape="sql"}Participant Role{/ts}'{/localize}, 1, 'participant_role', 0, 1, 1 ); ALTER TABLE civicrm_action_schedule ADD `absolute_date` date DEFAULT NULL COMMENT 'Date on which the reminder be sent.'; ALTER TABLE civicrm_action_schedule ADD `recipient_listing` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'listing based on recipient field.'; - - + + -- CRM-8534 -ALTER TABLE civicrm_pcp_block +ALTER TABLE civicrm_pcp_block DROP FOREIGN KEY FK_civicrm_pcp_block_entity_id, DROP INDEX FK_civicrm_pcp_block_entity_id; -ALTER TABLE civicrm_pcp +ALTER TABLE civicrm_pcp DROP FOREIGN KEY FK_civicrm_pcp_contribution_page_id, DROP INDEX FK_civicrm_pcp_contribution_page_id; -ALTER TABLE `civicrm_pcp` +ALTER TABLE `civicrm_pcp` ADD `page_type` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'contribute' AFTER `contribution_page_id`; -ALTER TABLE `civicrm_pcp` +ALTER TABLE `civicrm_pcp` CHANGE `contribution_page_id` `page_id` INT( 10 ) UNSIGNED NOT NULL COMMENT 'The Page which triggered this pcp'; ALTER TABLE `civicrm_pcp` ADD `pcp_block_id` int(10) unsigned NOT NULL COMMENT 'The pcp block that this pcp page was created from' AFTER `page_type`; @@ -388,7 +388,7 @@ SELECT @adminEventIdWeight := MAX(weight)+1 FROM civicrm_navigation where parent INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( @domainID, 'civicrm/admin/pcp?reset=1&page_type=event', '{ts escape="sql" skip="true"}Personal Campaign Pages{/ts}', 'Personal Campaign Pages', 'access CiviEvent,administer CiviCRM', 'AND', @lastEventId, '1', 1, @lastEventIdWeight ), ( @domainID, 'civicrm/admin/pcp?reset=1&page_type=event', '{ts escape="sql" skip="true"}Personal Campaign Pages{/ts}', 'Personal Campaign Pages', 'access CiviEvent,administer CiviCRM', 'AND', @adminEventId, '1', 1, @adminEventIdWeight ); @@ -426,8 +426,8 @@ CREATE TABLE `civicrm_job_log` ( ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `civicrm_job` - ( domain_id, run_frequency, last_run, name, description, api_prefix, api_entity, api_action, parameters, is_active ) -VALUES + ( domain_id, run_frequency, last_run, name, description, api_prefix, api_entity, api_action, parameters, is_active ) +VALUES ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Mailings scheduler{/ts}', '{ts escape="sql" skip="true"}Sends out scheduled mailings{/ts}', 'civicrm_api3', 'job', 'process_mailing', 'user=USERNAME\r\npassword=PASSWORD\r\nkey=SITE_KEY', 0), ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Bounces fetcher{/ts}', '{ts escape="sql" skip="true"}Fetches bounces from mailings and writes them to mailing statistics{/ts}', 'civicrm_api3', 'job', 'fetch_bounces', 'user=USERNAME\r\npassword=PASSWORD\r\nkey=SITE_KEY', 0), ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Activity processor{/ts}', '{ts escape="sql" skip="true"}{/ts}', 'civicrm_api3', 'job', 'fetch_activities', 'user=USERNAME\r\npassword=PASSWORD\r\nkey=SITE_KEY', 0), @@ -444,7 +444,7 @@ VALUES ALTER TABLE civicrm_contribution_recur ADD is_email_receipt TINYINT (4) COMMENT 'if true, receipt is automatically emailed to contact on each successful payment' AFTER payment_processor_id; --- /***** Civicrm Multi-Event Registration ***********/ +-- /***** Civicrm Multi-Event Registration ***********/ CREATE TABLE civicrm_event_carts ( id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Cart Id', @@ -493,15 +493,15 @@ ALTER TABLE civicrm_event ALTER TABLE civicrm_event ADD slot_label_id int unsigned DEFAULT NULL COMMENT 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'; -INSERT INTO +INSERT INTO `civicrm_option_group` (`name`, {localize field='label'}`label`{/localize}, {localize field='description'}`description`{/localize}, `is_reserved`, `is_active`) -VALUES +VALUES ('conference_slot' , {localize}'{ts escape="sql"}Conference Slot{/ts}'{/localize}, {localize}'{ts escape="sql"}Conference Slot{/ts}'{/localize} , 1, 1); SELECT @option_group_id_conference_slot := max(id) from civicrm_option_group where name = 'conference_slot'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) VALUES (@option_group_id_conference_slot, {localize}'{ts escape="sql"}Morning Sessions{/ts}'{/localize}, 1, '{ts escape="sql"}Morning Sessions{/ts}', NULL, 0, NULL, 1, {localize}'{ts escape="sql"}NULL{/ts}'{/localize}, 0, 0, 1, NULL, NULL), (@option_group_id_conference_slot, {localize}'{ts escape="sql"}Evening Sessions{/ts}'{/localize}, 2, '{ts escape="sql"}Evening Sessions{/ts}', NULL, 0, NULL, 2, {localize}'{ts escape="sql"}NULL{/ts}'{/localize}, 0, 0, 1, NULL, NULL); diff --git a/CRM/Upgrade/Incremental/sql/4.1.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.1.alpha2.mysql.tpl index 5299f0016c..e840272121 100644 --- a/CRM/Upgrade/Incremental/sql/4.1.alpha2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.1.alpha2.mysql.tpl @@ -1,8 +1,8 @@ -- CRM-8356 added missing option values SELECT @option_group_id_acConRef := max(id) from civicrm_option_group where name = 'contact_reference_options'; -INSERT INTO civicrm_option_value - (option_group_id, {localize field='label'}label{/localize}, value, name, filter, weight, is_active ) +INSERT INTO civicrm_option_value + (option_group_id, {localize field='label'}label{/localize}, value, name, filter, weight, is_active ) VALUES (@option_group_id_acConRef, {localize}'{ts escape="sql"}Email Address{/ts}'{/localize} , 2, 'email' , 0, 2, 1 ), (@option_group_id_acConRef, {localize}'{ts escape="sql"}Phone{/ts}'{/localize} , 3, 'phone' , 0, 3, 1 ), diff --git a/CRM/Upgrade/Incremental/sql/4.1.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.1.beta1.mysql.tpl index f0831b4893..adfd46fe6c 100644 --- a/CRM/Upgrade/Incremental/sql/4.1.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.1.beta1.mysql.tpl @@ -5,7 +5,7 @@ -- CRM-8508 SELECT @option_group_id_cgeo := max(id) from civicrm_option_group where name = 'cg_extend_objects'; -INSERT INTO civicrm_option_value +INSERT INTO civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, visibility_id) VALUES (@option_group_id_cgeo, {localize}'{ts escape="sql"}Cases{/ts}'{/localize}, 'Case', 'civicrm_case', NULL, 0, NULL, 2, {localize}'CRM_Case_PseudoConstant::caseType;'{/localize}, 0, 0, 1, NULL, NULL); diff --git a/CRM/Upgrade/Incremental/sql/4.1.beta2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.1.beta2.mysql.tpl index 126d87a041..375b4443e2 100644 --- a/CRM/Upgrade/Incremental/sql/4.1.beta2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.1.beta2.mysql.tpl @@ -4,116 +4,116 @@ INSERT INTO civicrm_msg_template VALUES ('Sample CiviMail Newsletter Template', 'Sample CiviMail Newsletter', '', ' - + - + - - + - +
- - - - - - -
- Replace this logo with the URL to your own -     - Your Newsletter Title -
-
+ + + + + + +
+ Replace this logo with the URL to your own +     + Your Newsletter Title +
+
- - - - - -
- - Greetings {literal}{contact.display_name}{/literal}, -

- This is a sample template designed to help you get started creating and sending your own CiviMail messages. This template uses an HTML layout that is generally compatible with the wide variety of email clients that your recipients might be using (e.g. Gmail, Outlook, Yahoo, etc.). -

You can select this "Sample CiviMail Newsletter Template" from the "Use Template" drop-down in Step 3 of creating a mailing, and customize it to your needs. Then check the "Save as New Template" box on the bottom the page to save your customized version for use in future mailings. -

The logo you use must be uploaded to your server. Copy and paste the URL path to the logo into the <img src= tag in the HTML at the top. Click "Source" or the Image button if you are using the text editor. -

- Edit the color of the links and headers using the color button or by editing the HTML. -

- Your newsletter message and donation appeal can go here. Click the link button to create links - remember to use a fully qualified URL starting with http:// in all your links! -

- To use CiviMail: - - Sincerely, -

- Your Team -
-
-
+ + + + + +
+ + Greetings {literal}{contact.display_name}{/literal}, +

+ This is a sample template designed to help you get started creating and sending your own CiviMail messages. This template uses an HTML layout that is generally compatible with the wide variety of email clients that your recipients might be using (e.g. Gmail, Outlook, Yahoo, etc.). +

You can select this "Sample CiviMail Newsletter Template" from the "Use Template" drop-down in Step 3 of creating a mailing, and customize it to your needs. Then check the "Save as New Template" box on the bottom the page to save your customized version for use in future mailings. +

The logo you use must be uploaded to your server. Copy and paste the URL path to the logo into the <img src= tag in the HTML at the top. Click "Source" or the Image button if you are using the text editor. +

+ Edit the color of the links and headers using the color button or by editing the HTML. +

+ Your newsletter message and donation appeal can go here. Click the link button to create links - remember to use a fully qualified URL starting with http:// in all your links! +

+ To use CiviMail: + + Sincerely, +

+ Your Team +
+
+
- - - - +

+ Important Dates
+ Tuesday August 27
+ Wednesday September 8
+ Thursday September 29
+ Saturday October 1
+ Sunday October 20
+ + + +
- - Featured Events
- Fundraising Dinner
- Training Meeting
- Board of Directors Annual Meeting
+
+ + + + - -
+ + Featured Events
+ Fundraising Dinner
+ Training Meeting
+ Board of Directors Annual Meeting
-

- Community Events
- Bake Sale
- Charity Auction
- Art Exhibit
+

+ Community Events
+ Bake Sale
+ Charity Auction
+ Art Exhibit
-

- Important Dates
- Tuesday August 27
- Wednesday September 8
- Thursday September 29
- Saturday October 1
- Sunday October 20
-
-
-
+
- - - - -
- - Helpful Tips -

- Tokens
- Click "Insert Tokens" to dynamically insert names, addresses, and other contact data of your recipients. -

- Plain Text Version
- Some people refuse HTML emails altogether. We recommend sending a plain-text version of your important communications to accommodate them. Luckily, CiviCRM accommodates for this! Just click "Plain Text" and copy and paste in some text. Line breaks (carriage returns) and fully qualified URLs like http://www.example.com are all you get, no HTML here! -

- Play by the Rules
- The address of the sender is required by the Can Spam Act law. This is an available token called domain.address. An unsubscribe or opt-out link is also required. There are several available tokens for this. {literal}{action.optOutUrl}{/literal} creates a link for recipients to click if they want to opt out of receiving emails from your organization. {literal}{action.unsubscribeUrl}{/literal} creates a link to unsubscribe from the specific mailing list used to send this message. Click on "Insert Tokens" to find these and look for tokens named "Domain" or "Unsubscribe". This sample template includes both required tokens at the bottom of the message. You can also configure a default Mailing Footer containing these tokens. -

- Composing Offline
- If you prefer to compose an HTML email offline in your own text editor, you can upload this HTML content into CiviMail or simply click "Source" and then copy and paste the HTML in. -

- Images
- Most email clients these days (Outlook, Gmail, etc) block image loading by default. This is to protect their users from annoying or harmful email. Not much we can do about this, so encourage recipients to add you to their contacts or "whitelist". Also use images sparingly, do not rely on images to convey vital information, and always use HTML "alt" tags which describe the image content. -
-
+ + + + +
+ + Helpful Tips +

+ Tokens
+ Click "Insert Tokens" to dynamically insert names, addresses, and other contact data of your recipients. +

+ Plain Text Version
+ Some people refuse HTML emails altogether. We recommend sending a plain-text version of your important communications to accommodate them. Luckily, CiviCRM accommodates for this! Just click "Plain Text" and copy and paste in some text. Line breaks (carriage returns) and fully qualified URLs like http://www.example.com are all you get, no HTML here! +

+ Play by the Rules
+ The address of the sender is required by the Can Spam Act law. This is an available token called domain.address. An unsubscribe or opt-out link is also required. There are several available tokens for this. {literal}{action.optOutUrl}{/literal} creates a link for recipients to click if they want to opt out of receiving emails from your organization. {literal}{action.unsubscribeUrl}{/literal} creates a link to unsubscribe from the specific mailing list used to send this message. Click on "Insert Tokens" to find these and look for tokens named "Domain" or "Unsubscribe". This sample template includes both required tokens at the bottom of the message. You can also configure a default Mailing Footer containing these tokens. +

+ Composing Offline
+ If you prefer to compose an HTML email offline in your own text editor, you can upload this HTML content into CiviMail or simply click "Source" and then copy and paste the HTML in. +

+ Images
+ Most email clients these days (Outlook, Gmail, etc) block image loading by default. This is to protect their users from annoying or harmful email. Not much we can do about this, so encourage recipients to add you to their contacts or "whitelist". Also use images sparingly, do not rely on images to convey vital information, and always use HTML "alt" tags which describe the image content. +
+
- -
- Click here to unsubscribe from this mailing list.

- Our mailing address is:
- {literal}{domain.address}{/literal} -
+ +
+ Click here to unsubscribe from this mailing list.

+ Our mailing address is:
+ {literal}{domain.address}{/literal} +
', NULL, 1, 0); diff --git a/CRM/Upgrade/Incremental/sql/4.1.beta3.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.1.beta3.mysql.tpl index c8dbac83fe..6af1ad4e54 100644 --- a/CRM/Upgrade/Incremental/sql/4.1.beta3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.1.beta3.mysql.tpl @@ -6,8 +6,8 @@ SET api_action = 'mail_report' WHERE api_action = 'mail_reports'; SELECT @domainID := min(id) FROM civicrm_domain; INSERT INTO `civicrm_job` - ( domain_id, run_frequency, last_run, name, description, api_prefix, api_entity, api_action, parameters, is_active ) -VALUES + ( domain_id, run_frequency, last_run, name, description, api_prefix, api_entity, api_action, parameters, is_active ) +VALUES ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Process Survey Respondents{/ts}', '{ts escape="sql" skip="true"}Releases reserved survey respondents when they have been reserved for longer than the Release Frequency days specified for that survey.{/ts}','civicrm_api3', 'job', 'process_respondent','version=3\r\n', 0); -- Job table was initially delivered with invalid and not-used parameters. Clearing them out. Most jobs do not need any parameters. diff --git a/CRM/Upgrade/Incremental/sql/4.2.0.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.2.0.mysql.tpl index 3456093d0a..ba1ac766c6 100644 --- a/CRM/Upgrade/Incremental/sql/4.2.0.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.2.0.mysql.tpl @@ -14,7 +14,7 @@ AND name = 'BULK SMS' AND option_group_id = @option_group_id_act; SELECT @newClientSMSValue := value FROM civicrm_option_value WHERE name = 'BULK SMS' AND option_group_id = @option_group_id_act; -UPDATE civicrm_activity +UPDATE civicrm_activity INNER JOIN civicrm_mailing ON civicrm_activity.source_record_id = civicrm_mailing.id SET civicrm_activity.activity_type_id = @newClientSMSValue WHERE civicrm_activity.activity_type_id = @clientSMSValue; diff --git a/CRM/Upgrade/Incremental/sql/4.2.2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.2.2.mysql.tpl index a1573b1e09..83177959e5 100644 --- a/CRM/Upgrade/Incremental/sql/4.2.2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.2.2.mysql.tpl @@ -5,7 +5,7 @@ UPDATE `civicrm_dedupe_rule_group` SET `is_default` = 0 WHERE @cnt_strict > 1 A SELECT @max_fuzzy := max(id), @cnt_fuzzy := count(*) FROM `civicrm_dedupe_rule_group` WHERE `contact_type` = 'Individual' AND `level` = 'Fuzzy' AND `is_default` = 1; UPDATE `civicrm_dedupe_rule_group` SET `is_default` = 0 WHERE @cnt_fuzzy > 1 AND id = @max_fuzzy; --- Insert line items for contribution for api/import +-- Insert line items for contribution for api/import SELECT @fieldID := cpf.id, @fieldValueID := cpfv.id FROM civicrm_price_set cps LEFT JOIN civicrm_price_field cpf ON cps.id = cpf.price_set_id LEFT JOIN civicrm_price_field_value cpfv ON cpf.id = cpfv.price_field_id diff --git a/CRM/Upgrade/Incremental/sql/4.2.3.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.2.3.mysql.tpl index 785fb867b4..b979417702 100644 --- a/CRM/Upgrade/Incremental/sql/4.2.3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.2.3.mysql.tpl @@ -14,24 +14,24 @@ VALUES SELECT @optionID := max(id) FROM civicrm_option_value WHERE name = 'BULK SMS'; {if $multilingual} {foreach from=$locales item=locale} - UPDATE `civicrm_option_value` SET label_{$locale} = '{ts escape="sql"}Mass SMS{/ts}',name = 'Mass SMS',description_{$locale} = '{ts escape="sql"}Mass SMS{/ts}' WHERE id = @optionID; - ALTER TABLE `civicrm_price_field_value` CHANGE name name VARCHAR(255) NULL DEFAULT NULL, CHANGE label_{$locale} label_{$locale} VARCHAR(255) NULL DEFAULT NULL; + UPDATE `civicrm_option_value` SET label_{$locale} = '{ts escape="sql"}Mass SMS{/ts}',name = 'Mass SMS',description_{$locale} = '{ts escape="sql"}Mass SMS{/ts}' WHERE id = @optionID; + ALTER TABLE `civicrm_price_field_value` CHANGE name name VARCHAR(255) NULL DEFAULT NULL, CHANGE label_{$locale} label_{$locale} VARCHAR(255) NULL DEFAULT NULL; {/foreach} {else} - UPDATE `civicrm_option_value` SET label = '{ts escape="sql"}Mass SMS{/ts}',name = 'Mass SMS',description = '{ts escape="sql"}Mass SMS{/ts}' WHERE name = 'BULK SMS'; - ALTER TABLE `civicrm_price_field_value` CHANGE `name` `name` VARCHAR(255) NULL DEFAULT NULL, CHANGE `label` `label` VARCHAR(255) NULL DEFAULT NULL; + UPDATE `civicrm_option_value` SET label = '{ts escape="sql"}Mass SMS{/ts}',name = 'Mass SMS',description = '{ts escape="sql"}Mass SMS{/ts}' WHERE name = 'BULK SMS';s + ALTER TABLE `civicrm_price_field_value` CHANGE `name` `name` VARCHAR(255) NULL DEFAULT NULL, CHANGE `label` `label` VARCHAR(255) NULL DEFAULT NULL; {/if} -- CRM-11014 ALTER TABLE `civicrm_line_item` CHANGE `label` `label` VARCHAR(255) NULL DEFAULT NULL; - + -- CRM-10986: Rename Batches UI elements to Bulk Data Entry -- update reserved profile titles {if $multilingual} {foreach from=$locales item=locale} - UPDATE `civicrm_uf_group` SET title_{$locale} = '{ts escape="sql"}Contribution Bulk Entry{/ts}' WHERE name = 'contribution_batch_entry'; + UPDATE `civicrm_uf_group` SET title_{$locale} = '{ts escape="sql"}Contribution Bulk Entry{/ts}' WHERE name = 'contribution_batch_entry'; UPDATE `civicrm_uf_group` SET title_{$locale} = '{ts escape="sql"}Membership Bulk Entry{/ts}' WHERE name = 'membership_batch_entry'; - {/foreach} + {/foreach} {else} UPDATE `civicrm_uf_group` SET title = '{ts escape="sql"}Contribution Bulk Entry{/ts}' WHERE name = 'contribution_batch_entry'; UPDATE `civicrm_uf_group` SET title = '{ts escape="sql"}Membership Bulk Entry{/ts}' WHERE name = 'membership_batch_entry'; diff --git a/CRM/Upgrade/Incremental/sql/4.2.5.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.2.5.mysql.tpl index 671724bdfd..f60a29aeef 100644 --- a/CRM/Upgrade/Incremental/sql/4.2.5.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.2.5.mysql.tpl @@ -6,5 +6,5 @@ SELECT @domainID := min(id) FROM civicrm_domain; -- CRM-11060 INSERT INTO `civicrm_job` ( domain_id, run_frequency, last_run, name, description, api_prefix, api_entity, api_action, parameters, is_active ) -VALUES +VALUES ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Send Scheduled SMS{/ts}', '{ts escape="sql" skip="true"}Sends out scheduled SMS{/ts}', 'civicrm_api3', 'job', 'process_sms', NULL, 0); diff --git a/CRM/Upgrade/Incremental/sql/4.2.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.2.alpha2.mysql.tpl index 44f7384f2d..a70e5eb7be 100644 --- a/CRM/Upgrade/Incremental/sql/4.2.alpha2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.2.alpha2.mysql.tpl @@ -4,6 +4,6 @@ DELETE FROM `civicrm_price_set_entity` WHERE entity_table = "civicrm_contribution" or entity_table = "civicrm_participant"; -- When deleting saved searches, null-out references from groups -ALTER TABLE civicrm_group ADD CONSTRAINT `FK_civicrm_group_saved_search_id` - FOREIGN KEY (`saved_search_id`) REFERENCES `civicrm_saved_search` (`id`) +ALTER TABLE civicrm_group ADD CONSTRAINT `FK_civicrm_group_saved_search_id` + FOREIGN KEY (`saved_search_id`) REFERENCES `civicrm_saved_search` (`id`) ON DELETE SET NULL; diff --git a/CRM/Upgrade/Incremental/sql/4.2.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.2.beta1.mysql.tpl index 208534ce81..1d461f5f04 100644 --- a/CRM/Upgrade/Incremental/sql/4.2.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.2.beta1.mysql.tpl @@ -13,7 +13,7 @@ CREATE TABLE `civicrm_extension` ( PRIMARY KEY ( `id` ) , UNIQUE INDEX `UI_extension_full_name`( `full_name` - ), + ), INDEX `UI_extension_name`( `name` ) diff --git a/CRM/Upgrade/Incremental/sql/4.2.beta6.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.2.beta6.mysql.tpl index 6bb96778f3..5151adf155 100644 --- a/CRM/Upgrade/Incremental/sql/4.2.beta6.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.2.beta6.mysql.tpl @@ -9,7 +9,7 @@ CREATE TABLE `civicrm_managed` ( `entity_type` varchar(64) NOT NULL COMMENT 'API entity type', `entity_id` int unsigned NOT NULL COMMENT 'Foreign key to the referenced item.', PRIMARY KEY ( `id` ) - + , INDEX `UI_managed_module_name`( `module` , `name` @@ -18,6 +18,6 @@ CREATE TABLE `civicrm_managed` ( `entity_type` , `entity_id` ) - - + + ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; diff --git a/CRM/Upgrade/Incremental/sql/4.3.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.3.alpha1.mysql.tpl index 65dbcf0f16..3ca27405a3 100644 --- a/CRM/Upgrade/Incremental/sql/4.3.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.3.alpha1.mysql.tpl @@ -1,7 +1,7 @@ {include file='../CRM/Upgrade/4.3.alpha1.msg_template/civicrm_msg_template.tpl'} -- CRM-10999 -ALTER TABLE `civicrm_premiums` +ALTER TABLE `civicrm_premiums` ADD COLUMN `premiums_nothankyou_position` int(10) unsigned DEFAULT '1'; -- CRM-11514 if contribution type name is null, assign it a name @@ -31,14 +31,14 @@ ALTER TABLE civicrm_contact -- CRM-10296 DELETE FROM civicrm_job WHERE `api_action` = 'process_membership_reminder_date'; -ALTER TABLE civicrm_membership DROP COLUMN reminder_date; -ALTER TABLE civicrm_membership_log DROP COLUMN renewal_reminder_date; +ALTER TABLE civicrm_membership DROP COLUMN reminder_date; +ALTER TABLE civicrm_membership_log DROP COLUMN renewal_reminder_date; ALTER TABLE civicrm_membership_type - DROP COLUMN renewal_reminder_day, - DROP FOREIGN KEY FK_civicrm_membership_type_renewal_msg_id, - DROP INDEX FK_civicrm_membership_type_renewal_msg_id, - DROP COLUMN renewal_msg_id, - DROP COLUMN autorenewal_msg_id; + DROP COLUMN renewal_reminder_day, + DROP FOREIGN KEY FK_civicrm_membership_type_renewal_msg_id, + DROP INDEX FK_civicrm_membership_type_renewal_msg_id, + DROP COLUMN renewal_msg_id, + DROP COLUMN autorenewal_msg_id; -- CRM-10738 ALTER TABLE civicrm_msg_template @@ -58,7 +58,7 @@ INSERT IGNORE INTO `civicrm_state_province`(`country_id`, `abbreviation`, `name` {if $multilingual} {foreach from=$locales item=locale} UPDATE civicrm_option_group SET title_{$locale} = '{ts escape="sql"}Currencies Enabled{/ts}' WHERE name = "currencies_enabled"; - ALTER TABLE `civicrm_premiums` + ALTER TABLE `civicrm_premiums` ADD COLUMN premiums_nothankyou_label_{$locale} varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Label displayed for No Thank-you option in premiums block (e.g. No thank you)'; {/foreach} {else} @@ -472,7 +472,7 @@ AND `weight` > @add_weight_id; INSERT INTO `civicrm_navigation` ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES - ( {$domainID}, 'civicrm/admin/financial/financialAccount&reset=1', '{ts escape="sql" skip="true"}Financial Account{/ts}', 'Financial Account', 'access CiviContribute,administer CiviCRM', 'AND', @parent_id, '1', NULL, @add_weight_id + 1 ); + ( {$domainID}, 'civicrm/admin/financial/financialAccount&reset=1', '{ts escape="sql" skip="true"}Financial Account{/ts}', 'Financial Account', 'access CiviContribute,administer CiviCRM', 'AND', @parent_id, '1', NULL, @add_weight_id + 1 ); -- CRM-10944 SELECT @contributionlastID := max(id) from civicrm_navigation where name = 'Contributions'; @@ -574,8 +574,8 @@ SELECT @option_value_rel_id_exp := value FROM `civicrm_option_value` WHERE `opt SELECT @option_value_rel_id_ar := value FROM `civicrm_option_value` WHERE `option_group_id` = @option_group_id_arel AND `name` = 'Accounts Receivable Account is'; SELECT @option_value_rel_id_as := value FROM `civicrm_option_value` WHERE `option_group_id` = @option_group_id_arel AND `name` = 'Asset Account is'; -SELECT @financial_account_id_bf := max(id) FROM `civicrm_financial_account` WHERE `name` = 'Banking Fees'; -SELECT @financial_account_id_ap := max(id) FROM `civicrm_financial_account` WHERE `name` = 'Accounts Receivable'; +SELECT @financial_account_id_bf := max(id) FROM `civicrm_financial_account` WHERE `name` = 'Banking Fees'; +SELECT @financial_account_id_ap := max(id) FROM `civicrm_financial_account` WHERE `name` = 'Accounts Receivable'; INSERT INTO `civicrm_entity_financial_account` ( entity_table, entity_id, account_relationship, financial_account_id ) @@ -714,99 +714,99 @@ DELETE FROM civicrm_state_province WHERE name IN ('Ventspils Apripkis', 'Aizkrau INSERT IGNORE INTO civicrm_state_province (country_id, abbreviation, name) VALUES (@country_id, '002', 'Aizkraukles novads'), (@country_id, '038', 'Jaunjelgavas novads'), -(@country_id, '072', 'Pļaviņu novads'), +(@country_id, '072', 'Pļaviņu novads'), (@country_id, '046', 'Kokneses novads'), (@country_id, '065', 'Neretas novads'), -(@country_id, '092', 'Skrīveru novads'), -(@country_id, '007', 'Alūksnes novads'), +(@country_id, '092', 'SkrÄ«veru novads'), +(@country_id, '007', 'AlÅ«ksnes novads'), (@country_id, '009', 'Apes novads'), (@country_id, '015', 'Balvu novads'), -(@country_id, '108', 'Viļakas novads'), +(@country_id, '108', 'Viļakas novads'), (@country_id, '014', 'Baltinavas novads'), -(@country_id, '082', 'Rugāju novads'), +(@country_id, '082', 'RugÄ�ju novads'), (@country_id, '016', 'Bauskas novads'), (@country_id, '034', 'Iecavas novads'), -(@country_id, '083', 'Rundāles novads'), +(@country_id, '083', 'RundÄ�les novads'), (@country_id, '105', 'Vecumnieku novads'), -(@country_id, '022', 'Cēsu novads'), -(@country_id, '055', 'Līgatnes novads'), +(@country_id, '022', 'CÄ“su novads'), +(@country_id, '055', 'LÄ«gatnes novads'), (@country_id, '008', 'Amatas novads'), (@country_id, '039', 'Jaunpiebalgas novads'), -(@country_id, '075', 'Priekuļu novads'), -(@country_id, '070', 'Pārgaujas novads'), +(@country_id, '075', 'Priekuļu novads'), +(@country_id, '070', 'PÄ�rgaujas novads'), (@country_id, '076', 'Raunas novads'), (@country_id, '104', 'Vecpiebalgas novads'), (@country_id, '025', 'Daugavpils novads'), -(@country_id, '036', 'Ilūkstes novads'), +(@country_id, '036', 'IlÅ«kstes novads'), (@country_id, '026', 'Dobeles novads'), (@country_id, '010', 'Auces novads'), -(@country_id, '098', 'Tērvetes novads'), +(@country_id, '098', 'TÄ“rvetes novads'), (@country_id, '033', 'Gulbenes novads'), (@country_id, '041', 'Jelgavas novads'), (@country_id, '069', 'Ozolnieku novads'), -(@country_id, '042', 'Jēkabpils novads'), -(@country_id, '004', 'Aknīstes novads'), -(@country_id, '107', 'Viesītes novads'), +(@country_id, '042', 'JÄ“kabpils novads'), +(@country_id, '004', 'AknÄ«stes novads'), +(@country_id, '107', 'ViesÄ«tes novads'), (@country_id, '049', 'Krustpils novads'), (@country_id, '085', 'Salas novads'), -(@country_id, '047', 'Krāslavas novads'), +(@country_id, '047', 'KrÄ�slavas novads'), (@country_id, '024', 'Dagdas novads'), (@country_id, '001', 'Aglonas novads'), -(@country_id, '050', 'Kuldīgas novads'), +(@country_id, '050', 'KuldÄ«gas novads'), (@country_id, '093', 'Skrundas novads'), (@country_id, '006', 'Alsungas novads'), (@country_id, '003', 'Aizputes novads'), (@country_id, '028', 'Durbes novads'), -(@country_id, '032', 'Grobiņas novads'), -(@country_id, '071', 'Pāvilostas novads'), +(@country_id, '032', 'Grobiņas novads'), +(@country_id, '071', 'PÄ�vilostas novads'), (@country_id, '074', 'Priekules novads'), -(@country_id, '066', 'Nīcas novads'), +(@country_id, '066', 'NÄ«cas novads'), (@country_id, '081', 'Rucavas novads'), -(@country_id, '100', 'Vaiņodes novads'), -(@country_id, '054', 'Limbažu novads'), +(@country_id, '100', 'Vaiņodes novads'), +(@country_id, '054', 'Limbažu novads'), (@country_id, '005', 'Alojas novads'), -(@country_id, '086', 'Salacgrīvas novads'), +(@country_id, '086', 'SalacgrÄ«vas novads'), (@country_id, '058', 'Ludzas novads'), -(@country_id, '044', 'Kārsavas novads'), +(@country_id, '044', 'KÄ�rsavas novads'), (@country_id, '110', 'Zilupes novads'), (@country_id, '023', 'Ciblas novads'), (@country_id, '059', 'Madonas novads'), (@country_id, '021', 'Cesvaines novads'), -(@country_id, '057', 'Lubānas novads'), -(@country_id, '102', 'Varakļānu novads'), -(@country_id, '030', 'Ērgļu novads'), +(@country_id, '057', 'LubÄ�nas novads'), +(@country_id, '102', 'VarakļÄ�nu novads'), +(@country_id, '030', 'Ä’rgļu novads'), (@country_id, '067', 'Ogres novads'), -(@country_id, '035', 'Ikšķiles novads'), -(@country_id, '051', 'Ķeguma novads'), -(@country_id, '053', 'Lielvārdes novads'), -(@country_id, '073', 'Preiļu novads'), -(@country_id, '056', 'Līvānu novads'), -(@country_id, '078', 'Riebiņu novads'), -(@country_id, '103', 'Vārkavas novads'), -(@country_id, '077', 'Rēzeknes novads'), -(@country_id, '109', 'Viļānu novads'), +(@country_id, '035', 'Ikšķiles novads'), +(@country_id, '051', 'Ķeguma novads'), +(@country_id, '053', 'LielvÄ�rdes novads'), +(@country_id, '073', 'Preiļu novads'), +(@country_id, '056', 'LÄ«vÄ�nu novads'), +(@country_id, '078', 'Riebiņu novads'), +(@country_id, '103', 'VÄ�rkavas novads'), +(@country_id, '077', 'RÄ“zeknes novads'), +(@country_id, '109', 'ViļÄ�nu novads'), (@country_id, '013', 'Baldones novads'), -(@country_id, '052', 'Ķekavas novads'), +(@country_id, '052', 'Ķekavas novads'), (@country_id, '068', 'Olaines novads'), (@country_id, '087', 'Salaspils novads'), (@country_id, '089', 'Saulkrastu novads'), (@country_id, '091', 'Siguldas novads'), -(@country_id, '037', 'Inčukalna novads'), -(@country_id, '011', 'Ādažu novads'), -(@country_id, '012', 'Babītes novads'), +(@country_id, '037', 'InÄ�ukalna novads'), +(@country_id, '011', 'Ä€dažu novads'), +(@country_id, '012', 'BabÄ«tes novads'), (@country_id, '020', 'Carnikavas novads'), (@country_id, '031', 'Garkalnes novads'), (@country_id, '048', 'Krimuldas novads'), -(@country_id, '061', 'Mālpils novads'), -(@country_id, '062', 'Mārupes novads'), -(@country_id, '080', 'Ropažu novads'), -(@country_id, '090', 'Sējas novads'), -(@country_id, '095', 'Stopiņu novads'), +(@country_id, '061', 'MÄ�lpils novads'), +(@country_id, '062', 'MÄ�rupes novads'), +(@country_id, '080', 'Ropažu novads'), +(@country_id, '090', 'SÄ“jas novads'), +(@country_id, '095', 'Stopiņu novads'), (@country_id, '088', 'Saldus novads'), -(@country_id, '018', 'Brocēnu novads'), +(@country_id, '018', 'BrocÄ“nu novads'), (@country_id, '097', 'Talsu novads'), (@country_id, '027', 'Dundagas novads'), -(@country_id, '063', 'Mērsraga novads'), +(@country_id, '063', 'MÄ“rsraga novads'), (@country_id, '079', 'Rojas novads'), (@country_id, '099', 'Tukuma novads'), (@country_id, '043', 'Kandavas novads'), @@ -814,15 +814,15 @@ INSERT IGNORE INTO civicrm_state_province (country_id, abbreviation, name) VALUE (@country_id, '040', 'Jaunpils novads'), (@country_id, '101', 'Valkas novads'), (@country_id, '094', 'Smiltenes novads'), -(@country_id, '096', 'Strenču novads'), -(@country_id, '045', 'Kocēnu novads'), +(@country_id, '096', 'StrenÄ�u novads'), +(@country_id, '045', 'KocÄ“nu novads'), (@country_id, '060', 'Mazsalacas novads'), -(@country_id, '084', 'Rūjienas novads'), -(@country_id, '017', 'Beverīnas novads'), +(@country_id, '084', 'RÅ«jienas novads'), +(@country_id, '017', 'BeverÄ«nas novads'), (@country_id, '019', 'Burtnieku novads'), -(@country_id, '064', 'Naukšēnu novads'), +(@country_id, '064', 'Naukšēnu novads'), (@country_id, '106', 'Ventspils novads'), -(@country_id, 'JKB', 'Jēkabpils'), +(@country_id, 'JKB', 'JÄ“kabpils'), (@country_id, 'VMR', 'Valmiera'); -- CRM-11507 diff --git a/CRM/Upgrade/Incremental/sql/4.3.alpha2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.3.alpha2.mysql.tpl index c5ec4cde59..0099df7724 100644 --- a/CRM/Upgrade/Incremental/sql/4.3.alpha2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.3.alpha2.mysql.tpl @@ -2,7 +2,7 @@ UPDATE `civicrm_dedupe_rule_group` SET name = 'IndividualGeneral' WHERE name = 'IndividualComplete'; - + -- CRM-11791 INSERT IGNORE INTO `civicrm_relationship_type` ( name_a_b,label_a_b, name_b_a,label_b_a, description, contact_type_a, contact_type_b, is_reserved ) VALUES @@ -16,7 +16,7 @@ UPDATE `civicrm_navigation` name = 'Closed Batches' OR name = 'Exported Batches' OR name = 'Accounting Batches'; - + UPDATE `civicrm_navigation` SET permission = 'create manual batch' WHERE diff --git a/CRM/Upgrade/Incremental/sql/4.3.beta3.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.3.beta3.mysql.tpl index 4e3e5fcfc4..b8a87c1a23 100644 --- a/CRM/Upgrade/Incremental/sql/4.3.beta3.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.3.beta3.mysql.tpl @@ -13,7 +13,7 @@ WHERE cog.name = 'account_type'; SET label_{$locale} = 'Financial Type' WHERE field_name = 'financial_type' AND label_{$locale} = 'Contribution Type'; {/foreach} - + {else} UPDATE civicrm_uf_field SET field_name = 'financial_type', diff --git a/CRM/Upgrade/Incremental/sql/README.txt b/CRM/Upgrade/Incremental/sql/README.txt index cb62d1d2ec..81f96431b7 100644 --- a/CRM/Upgrade/Incremental/sql/README.txt +++ b/CRM/Upgrade/Incremental/sql/README.txt @@ -41,7 +41,7 @@ VALUES Previously, a SELECT INTO @domainID was used. This method is deprecated and should NOT be used: ---------------------------------------------------- --- get domain id +-- get domain id SELECT @domainID := min(id) FROM civicrm_domain; ---------------------------------------------------- @@ -71,7 +71,7 @@ If a field is NOT localizable, but we just need to make sure it can be translate ---------------------------------------------------- INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) -VALUES +VALUES ( {$domainID}, 'civicrm/admin&reset=1', '{ts escape="sql" skip="true"}Administration Console{/ts}', 'Administration Console', 'administer CiviCRM', '', @adminlastID, '1', NULL, 1 ); ---------------------------------------------------- diff --git a/CRM/Upgrade/Page/Cleanup.php b/CRM/Upgrade/Page/Cleanup.php index aa1977e712..37507fbbbe 100644 --- a/CRM/Upgrade/Page/Cleanup.php +++ b/CRM/Upgrade/Page/Cleanup.php @@ -29,7 +29,7 @@ class CRM_Upgrade_Page_Cleanup extends CRM_Core_Page { $rows = CRM_Upgrade_Incremental_php_FourTwo::deleteInvalidPairs(); $template = CRM_Core_Smarty::singleton(); - $columnHeaders = array("Contact ID", "ContributionID", "Contribution Status", "MembershipID", + $columnHeaders = array("Contact ID", "ContributionID", "Contribution Status", "MembershipID", "Membership Type", "Start Date", "End Date", "Membership Status", "Action"); $template->assign('columnHeaders', $columnHeaders); $template->assign('rows', $rows); diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php b/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php index f26e357321..7a25651a2b 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php @@ -122,9 +122,9 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field extends CRM_Upgrade_Snapshot_V4p for ($index = 1; $index <= $maxIndex; $index++) { - if (array_key_exists('option_amount', $params) && - array_key_exists($index, $params['option_amount']) && - (CRM_Utils_Array::value($index, CRM_Utils_Array::value('option_label', $params)) || + if (array_key_exists('option_amount', $params) && + array_key_exists($index, $params['option_amount']) && + (CRM_Utils_Array::value($index, CRM_Utils_Array::value('option_label', $params)) || CRM_Utils_Array::value('is_quick_config', $params)) && !CRM_Utils_System::isNull($params['option_amount'][$index]) ) { diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Set.php b/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Set.php index f20d17360c..77bc36c7ce 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Set.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/BAO/Set.php @@ -96,7 +96,7 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_Set extends CRM_Upgrade_Snapshot_V4p2_ return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $id, 'is_active', $isActive); } - /** + /** * Calculate the default price set id * assigned to the contribution/membership etc * @@ -208,7 +208,7 @@ LEFT JOIN civicrm_option_value ON LEFT JOIN civicrm_option_group ON ( civicrm_option_group.id = civicrm_option_value.option_group_id ) WHERE - civicrm_option_group.name = 'event_type' AND + civicrm_option_group.name = 'event_type' AND ( ce.is_template IS NULL OR ce.is_template = 0) AND ce.id IN ($ids) AND ce.is_active = 1;"; @@ -1066,7 +1066,7 @@ return 0; * @return array associate array of frequency interval and unit * @static * @access public - */ + */ public static function getRecurDetails($priceSetId) { $query = 'SELECT mt.duration_interval, mt.duration_unit FROM civicrm_price_field_value pfv @@ -1079,14 +1079,14 @@ return 0; $dao->fetch(); return array($dao->duration_interval, $dao->duration_unit); } - + static function eventPriceSetDomainID() { return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME, 'event_price_set_domain_id', NULL, FALSE ); } - + /** * update the is_quick_config flag in the db * diff --git a/CRM/Upgrade/ThreeOne/ThreeOne.php b/CRM/Upgrade/ThreeOne/ThreeOne.php index 314b7dbf28..93d21f3bcd 100644 --- a/CRM/Upgrade/ThreeOne/ThreeOne.php +++ b/CRM/Upgrade/ThreeOne/ThreeOne.php @@ -267,7 +267,7 @@ class CRM_Upgrade_ThreeOne_ThreeOne extends CRM_Upgrade_Form { $totalCount = 0; $addressQuery = " UPDATE civicrm_address as address -INNER JOIN ( SELECT id, contact_id FROM civicrm_address WHERE is_primary = 1 GROUP BY contact_id HAVING count( id ) > 1 ) as dup_address +INNER JOIN ( SELECT id, contact_id FROM civicrm_address WHERE is_primary = 1 GROUP BY contact_id HAVING count( id ) > 1 ) as dup_address ON ( address.contact_id = dup_address.contact_id AND address.id != dup_address.id ) SET address.is_primary = 0"; CRM_Core_DAO::executeQuery($addressQuery); diff --git a/CRM/Upgrade/ThreeZero/ThreeZero.php b/CRM/Upgrade/ThreeZero/ThreeZero.php index 82b01acde3..93b3a31e2e 100644 --- a/CRM/Upgrade/ThreeZero/ThreeZero.php +++ b/CRM/Upgrade/ThreeZero/ThreeZero.php @@ -111,7 +111,7 @@ class CRM_Upgrade_ThreeZero_ThreeZero extends CRM_Upgrade_Form { //Run the SQL file (1) $upgrade->processSQL($rev); //replace with ; in report instance - $sql = "UPDATE civicrm_report_instance + $sql = "UPDATE civicrm_report_instance SET form_values = REPLACE(form_values,'#',';') "; CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray); @@ -121,11 +121,11 @@ class CRM_Upgrade_ThreeZero_ThreeZero extends CRM_Upgrade_Form { if ($bulkEmailID) { $mailingActivityIds = array(); - $query = " - SELECT max( ca.id ) as aid, + $query = " + SELECT max( ca.id ) as aid, ca.source_record_id sid FROM civicrm_activity ca - WHERE ca.activity_type_id = %1 + WHERE ca.activity_type_id = %1 GROUP BY ca.source_record_id"; $params = array(1 => array($bulkEmailID, 'Integer')); @@ -133,23 +133,23 @@ class CRM_Upgrade_ThreeZero_ThreeZero extends CRM_Upgrade_Form { while ($dao->fetch()) { $updateQuery = " - UPDATE civicrm_activity_target cat, civicrm_activity ca - SET cat.activity_id = {$dao->aid} + UPDATE civicrm_activity_target cat, civicrm_activity ca + SET cat.activity_id = {$dao->aid} WHERE ca.source_record_id IS NOT NULL AND - ca.activity_type_id = %1 AND - ca.id <> {$dao->aid} AND - ca.source_record_id = {$dao->sid} AND + ca.activity_type_id = %1 AND + ca.id <> {$dao->aid} AND + ca.source_record_id = {$dao->sid} AND ca.id = cat.activity_id"; $updateParams = array(1 => array($bulkEmailID, 'Integer')); CRM_Core_DAO::executeQuery($updateQuery, $updateParams); - $deleteQuery = " - DELETE ca.* - FROM civicrm_activity ca - WHERE ca.source_record_id IS NOT NULL AND - ca.activity_type_id = %1 AND - ca.id <> {$dao->aid} AND + $deleteQuery = " + DELETE ca.* + FROM civicrm_activity ca + WHERE ca.source_record_id IS NOT NULL AND + ca.activity_type_id = %1 AND + ca.id <> {$dao->aid} AND ca.source_record_id = {$dao->sid}"; $deleteParams = array(1 => array($bulkEmailID, 'Integer')); @@ -160,27 +160,27 @@ class CRM_Upgrade_ThreeZero_ThreeZero extends CRM_Upgrade_Form { //CRM-4453 //lets insert column in civicrm_aprticipant table $query = " - ALTER TABLE `civicrm_participant` + ALTER TABLE `civicrm_participant` ADD `fee_currency` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '3 character string, value derived from config setting.' AFTER `discount_id`"; CRM_Core_DAO::executeQuery($query); //get currency from contribution table if exists/default //insert currency when fee_amount != NULL or event is paid. $query = " - SELECT civicrm_participant.id + SELECT civicrm_participant.id FROM civicrm_participant - LEFT JOIN civicrm_event + LEFT JOIN civicrm_event ON ( civicrm_participant.event_id = civicrm_event.id ) - WHERE civicrm_participant.fee_amount IS NOT NULL OR + WHERE civicrm_participant.fee_amount IS NOT NULL OR civicrm_event.is_monetary = 1"; $participant = CRM_Core_DAO::executeQuery($query); while ($participant->fetch()) { $query = " - SELECT civicrm_contribution.currency - FROM civicrm_contribution, + SELECT civicrm_contribution.currency + FROM civicrm_contribution, civicrm_participant_payment - WHERE civicrm_contribution.id = civicrm_participant_payment.contribution_id AND + WHERE civicrm_contribution.id = civicrm_participant_payment.contribution_id AND civicrm_participant_payment.participant_id = {$participant->id}"; $currencyID = CRM_Core_DAO::singleValueQuery($query); @@ -251,8 +251,8 @@ class CRM_Upgrade_ThreeZero_ThreeZero extends CRM_Upgrade_Form { //replace contact.contact_name with contact.addressee in civicrm_preference.mailing_format $updateQuery = " - UPDATE civicrm_preferences - SET `mailing_format` = + UPDATE civicrm_preferences + SET `mailing_format` = replace(`mailing_format`, '{contact.contact_name}','{contact.addressee}')"; CRM_Core_DAO::executeQuery($updateQuery); diff --git a/CRM/Upgrade/TwoOne/Form/Step1.php b/CRM/Upgrade/TwoOne/Form/Step1.php index 94f0df4cd1..b62bf8434b 100644 --- a/CRM/Upgrade/TwoOne/Form/Step1.php +++ b/CRM/Upgrade/TwoOne/Form/Step1.php @@ -277,7 +277,7 @@ class CRM_Upgrade_TwoOne_Form_Step1 extends CRM_Upgrade_Form { $query = " ALTER TABLE {$dao->table_name} -ADD UNIQUE unique_entity_id (entity_id), +ADD UNIQUE unique_entity_id (entity_id), DROP domain_id;"; CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); } diff --git a/CRM/Upgrade/TwoOne/Form/Step2.php b/CRM/Upgrade/TwoOne/Form/Step2.php index 242aad0881..d2e9bf7451 100644 --- a/CRM/Upgrade/TwoOne/Form/Step2.php +++ b/CRM/Upgrade/TwoOne/Form/Step2.php @@ -66,8 +66,8 @@ SELECT id FROM civicrm_option_group WHERE name = 'safe_file_extension'"; $dao->fetch(); if ($dao->id) { $query = " -INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) -VALUES +INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +VALUES ( %1, 'jpg', 1, NULL, NULL, 0, 0, 1, NULL, 0, 0, 1, NULL), ( %1, 'jpeg', 2, NULL, NULL, 0, 0, 2, NULL, 0, 0, 1, NULL), ( %1, 'png', 3, NULL, NULL, 0, 0, 3, NULL, 0, 0, 1, NULL), @@ -89,8 +89,8 @@ VALUES //delete records from db. $query = " -DELETE -FROM `civicrm_option_value` +DELETE +FROM `civicrm_option_value` WHERE `option_group_id` = %1 AND `label` IN ('html', 'htm') "; diff --git a/CRM/Upgrade/TwoOne/Form/Step3.php b/CRM/Upgrade/TwoOne/Form/Step3.php index 70239caf8b..a08a7aa979 100644 --- a/CRM/Upgrade/TwoOne/Form/Step3.php +++ b/CRM/Upgrade/TwoOne/Form/Step3.php @@ -49,7 +49,7 @@ class CRM_Upgrade_TwoOne_Form_Step3 extends CRM_Upgrade_Form { // CRM-3052, dropping location_id from group_contact if (CRM_Core_DAO::checkFieldExists('civicrm_group_contact', 'location_id')) { - $query = "ALTER TABLE `civicrm_group_contact` + $query = "ALTER TABLE `civicrm_group_contact` DROP FOREIGN KEY `FK_civicrm_group_contact_location_id`, DROP location_id"; CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); diff --git a/CRM/Upgrade/TwoOne/Form/TwoOneTwo.php b/CRM/Upgrade/TwoOne/Form/TwoOneTwo.php index 77edda0e7c..1db279251e 100644 --- a/CRM/Upgrade/TwoOne/Form/TwoOneTwo.php +++ b/CRM/Upgrade/TwoOne/Form/TwoOneTwo.php @@ -126,7 +126,7 @@ class CRM_Upgrade_TwoOne_Form_TwoOneTwo extends CRM_Upgrade_Form { UPDATE civicrm_participant,civicrm_option_group, civicrm_option_value, civicrm_event_page, civicrm_event SET civicrm_participant.fee_amount = civicrm_option_value.value WHERE civicrm_option_value.option_group_id = civicrm_option_group.id -AND civicrm_event_page.id = substring( civicrm_option_group.name FROM 27 ) +AND civicrm_event_page.id = substring( civicrm_option_group.name FROM 27 ) AND civicrm_option_group.name LIKE "civicrm_event_page.amount.%" AND civicrm_participant.event_id = civicrm_event.id AND civicrm_event.id = civicrm_event_page.event_id diff --git a/CRM/Upgrade/TwoOne/sql/domain_ids.mysql b/CRM/Upgrade/TwoOne/sql/domain_ids.mysql index d2c018c5bb..1e7020cd88 100644 --- a/CRM/Upgrade/TwoOne/sql/domain_ids.mysql +++ b/CRM/Upgrade/TwoOne/sql/domain_ids.mysql @@ -1,6 +1,6 @@ -- /************************************************************************ -- * --- * Upgrade script MySQL Script 2.0 -> 2.1 - Remove Domain Id Column from all tables +-- * Upgrade script MySQL Script 2.0 -> 2.1 - Remove Domain Id Column from all tables -- * -- *************************************************************************/ @@ -28,7 +28,7 @@ ALTER TABLE `civicrm_acl_entity_role` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_contact` +ALTER TABLE `civicrm_contact` DROP FOREIGN KEY `FK_civicrm_contact_domain_id`; ALTER TABLE `civicrm_contact` DROP domain_id; @@ -47,7 +47,7 @@ ALTER TABLE `civicrm_contribution_page` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_contribution` +ALTER TABLE `civicrm_contribution` DROP FOREIGN KEY `FK_civicrm_contribution_domain_id`, DROP INDEX UI_contrib_trxn_id_domain_id, DROP INDEX UI_contrib_invoice_id_domain_id; @@ -60,7 +60,7 @@ ALTER TABLE `civicrm_contribution` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_contribution_recur` +ALTER TABLE `civicrm_contribution_recur` DROP FOREIGN KEY `FK_civicrm_contribution_recur_domain_id`, DROP INDEX UI_contrib_trxn_id_domain_id, DROP INDEX UI_contrib_invoice_id_domain_id; @@ -73,7 +73,7 @@ ALTER TABLE `civicrm_contribution_recur` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_contribution_type` +ALTER TABLE `civicrm_contribution_type` DROP FOREIGN KEY `FK_civicrm_contribution_type_domain_id`, DROP INDEX UI_name_domain_id; @@ -111,7 +111,7 @@ ALTER TABLE `civicrm_event` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_financial_trxn` +ALTER TABLE `civicrm_financial_trxn` DROP FOREIGN KEY `FK_civicrm_financial_trxn_domain_id`, DROP INDEX UI_ft_trxn_id_domain_id; ALTER TABLE `civicrm_financial_trxn` DROP domain_id; @@ -122,7 +122,7 @@ ALTER TABLE `civicrm_financial_trxn` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_group` +ALTER TABLE `civicrm_group` DROP FOREIGN KEY `FK_civicrm_group_domain_id`, DROP INDEX UI_title_domain_id, DROP INDEX UI_name_domain_id; @@ -134,7 +134,7 @@ ALTER TABLE `civicrm_group` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_location_type` +ALTER TABLE `civicrm_location_type` DROP FOREIGN KEY `FK_civicrm_location_type_domain_id`, DROP INDEX UI_name_domain_id; ALTER TABLE `civicrm_location_type` DROP domain_id; @@ -208,7 +208,7 @@ ALTER TABLE `civicrm_msg_template` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_option_group` +ALTER TABLE `civicrm_option_group` DROP FOREIGN KEY `FK_civicrm_option_group_domain_id`, DROP INDEX option_group_name_domain_id; ALTER TABLE `civicrm_option_group` DROP domain_id; @@ -228,7 +228,7 @@ ALTER TABLE `civicrm_payment_processor` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_payment_processor_type` +ALTER TABLE `civicrm_payment_processor_type` DROP FOREIGN KEY `FK_civicrm_payment_processor_type_domain_id`, DROP INDEX UI_name_domain_id; ALTER TABLE `civicrm_payment_processor_type` DROP domain_id; @@ -284,7 +284,7 @@ ALTER TABLE `civicrm_project` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_relationship_type` +ALTER TABLE `civicrm_relationship_type` DROP FOREIGN KEY `FK_civicrm_relationship_type_domain_id`, DROP INDEX UI_name_a_b_domain_id, DROP INDEX UI_name_b_a_domain_id; @@ -296,7 +296,7 @@ ALTER TABLE `civicrm_relationship_type` DROP domain_id; -- * -- *******************************************************/ -ALTER TABLE `civicrm_tag` +ALTER TABLE `civicrm_tag` DROP FOREIGN KEY `FK_civicrm_tag_domain_id`, DROP INDEX UI_name_domain_id; ALTER TABLE `civicrm_tag` DROP domain_id; diff --git a/CRM/Upgrade/TwoOne/sql/group_values.mysql b/CRM/Upgrade/TwoOne/sql/group_values.mysql index 9e6a29d700..5bd0733bf9 100644 --- a/CRM/Upgrade/TwoOne/sql/group_values.mysql +++ b/CRM/Upgrade/TwoOne/sql/group_values.mysql @@ -11,8 +11,8 @@ -- First get max weight and value SELECT @option_act := civicrm_option_group.id, - @max_val := max(ROUND(civicrm_option_value.value)), - @max_wt := max(civicrm_option_value.weight) + @max_val := max(ROUND(civicrm_option_value.value)), + @max_wt := max(civicrm_option_value.weight) FROM civicrm_option_value, civicrm_option_group WHERE civicrm_option_group.name = 'activity_type' AND civicrm_option_value.option_group_id = civicrm_option_group.id @@ -20,7 +20,7 @@ GROUP BY civicrm_option_group.id; -- Insert new option values for option_group - activity_type -INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name` , `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name` , `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_act, 'Pledge Acknowledgment', (SELECT @max_val := @max_val+1), 'Pledge Acknowledgment', NULL, 1, NULL, (SELECT @max_wt := @max_wt+1), 'Send Pledge Acknowledgment.', 0, 1, 1, NULL), (@option_act, 'Pledge Reminder', (SELECT @max_val := @max_val+1), 'Pledge Reminder', NULL, 1, NULL, (SELECT @max_wt := @max_wt+1), 'Send Pledge Reminder.', 0, 1, 1, NULL); @@ -38,8 +38,8 @@ INSERT INTO `civicrm_option_group` (`name`, `description`, `is_reserved`, `is_ac SELECT @option_group_id_fu := max(id) from civicrm_option_group where name = 'recur_frequency_units'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_fu, 'daily' , 'day' , 'day', NULL, 0, NULL, 1, NULL, 0, 1, 1, NULL), (@option_group_id_fu, 'weekly' , 'week' , 'week', NULL, 0, NULL, 2, NULL, 0, 1, 1, NULL), @@ -53,8 +53,8 @@ INSERT INTO `civicrm_option_group` (`name`, `description`, `is_reserved`, `is_ac SELECT @option_group_id_mt := max(id) from civicrm_option_group where name = 'mapping_type'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_mt, '{ts escape="sql"}Search Builder{/ts}', 1, 'Search Builder', NULL, 0, 0, 1, NULL, 0, 1, 1, NULL), (@option_group_id_mt, '{ts escape="sql"}Import Contact{/ts}', 2, 'Import Contact', NULL, 0, 0, 2, NULL, 0, 1, 1, NULL), @@ -110,8 +110,8 @@ SELECT @option_group_id_cvOpt := max(id) from civicrm_option_group where name = DELETE FROM civicrm_option_value WHERE option_group_id=@option_group_id_cvOpt; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_cvOpt, 'Activities' , 1, 'activity', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL), (@option_group_id_cvOpt, 'Relationships', 2, 'rel', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL), @@ -133,8 +133,8 @@ SELECT @option_group_id_ceOpt := max(id) from civicrm_option_group wher DELETE FROM civicrm_option_value WHERE option_group_id=@option_group_id_ceOpt; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_ceOpt, 'Communication Preferences', 1, 'CommBlock', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL), (@option_group_id_ceOpt, 'Demographics' , 2, 'Demographics', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL), @@ -148,8 +148,8 @@ SELECT @option_group_id_asOpt := max(id) from civicrm_option_group wher DELETE FROM civicrm_option_value WHERE option_group_id=@option_group_id_asOpt; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_asOpt, 'Address Fields' , 1, 'location', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL), (@option_group_id_asOpt, 'Custom Fields' , 2, 'custom', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL), @@ -173,8 +173,8 @@ SELECT @option_group_id_udOpt := max(id) from civicrm_option_group wher DELETE FROM civicrm_option_value WHERE option_group_id=@option_group_id_udOpt; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_udOpt, 'Groups' , 1, 'Groups', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL), (@option_group_id_udOpt, 'Contributions' , 2, 'CiviContribute', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL), @@ -191,8 +191,8 @@ SELECT @option_group_id_adOpt := max(id) from civicrm_option_group wher DELETE FROM civicrm_option_value WHERE option_group_id=@option_group_id_adOpt; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_adOpt, 'Street Address' , 1, 'street_address', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL), (@option_group_id_adOpt, 'Addt\'l Address 1' , 2, 'supplemental_address_1', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL), @@ -213,8 +213,8 @@ SELECT @option_group_id_csearch := max(id) from civicrm_option_group wher DELETE FROM civicrm_option_value WHERE option_group_id=@option_group_id_csearch; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_group_id_csearch , 'CRM_Contact_Form_Search_Custom_Sample' , 1, 'CRM_Contact_Form_Search_Custom_Sample' , NULL, 0, NULL, 1, 'Household Name and State', 0, 0, 1, NULL), (@option_group_id_csearch , 'CRM_Contact_Form_Search_Custom_ContributionAggregate', 2, 'CRM_Contact_Form_Search_Custom_ContributionAggregate', NULL, 0, NULL, 2, 'Contribution Aggregate', 0, 0, 1, NULL), @@ -227,14 +227,14 @@ VALUES (@option_group_id_csearch , 'CRM_Contact_Form_Search_Custom_PriceSet', 9, 'CRM_Contact_Form_Search_Custom_PriceSet', NULL, 0, NULL, 9, 'Price Set Details for Event Participants', 0, 0, 1, NULL); -- option groups and values for 'wysiwyg_editor' , 'from_email_address'. -INSERT INTO +INSERT INTO `civicrm_option_group` (`name`, `description`, `is_reserved`, `is_active`) -VALUES +VALUES ('from_email_address', 'From Email Address', 0, 1), ('wysiwyg_editor' , 'WYSIWYG Editor' , 0, 1); SELECT @option_we := max(id) from civicrm_option_group where name = 'wysiwyg_editor'; -INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`,`name` , `grouping`, `filter`,`is_default`,`weight`, `description`,`is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`,`name` , `grouping`, `filter`,`is_default`,`weight`, `description`,`is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_we, 'TinyMCE' , 1, NULL, NULL, 0, NULL, 1, NULL, 0, 1, 1, NULL), (@option_we, 'FCKEditor' , 2, NULL, NULL, 0, NULL, 2, NULL, 0, 1, 1, NULL); @@ -242,15 +242,15 @@ VALUES -- Insert new option value address_name for option_group = 'address_options' SELECT @option_act := civicrm_option_group.id, - @max_val := max(ROUND(civicrm_option_value.value)), - @max_wt := max(civicrm_option_value.weight) + @max_val := max(ROUND(civicrm_option_value.value)), + @max_wt := max(civicrm_option_value.weight) FROM civicrm_option_value, civicrm_option_group WHERE civicrm_option_group.name = 'address_options' AND civicrm_option_value.option_group_id = civicrm_option_group.id GROUP BY civicrm_option_group.id; -INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name` , `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name` , `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES (@option_act, 'Address Name', (SELECT @max_val := @max_val+1), 'address_name', NULL, 0, NULL, (SELECT @max_wt := @max_wt+1), NULL, 0, 0, 1, NULL); diff --git a/CRM/Upgrade/TwoOne/sql/misc.mysql b/CRM/Upgrade/TwoOne/sql/misc.mysql index beb0143bcd..3868220099 100644 --- a/CRM/Upgrade/TwoOne/sql/misc.mysql +++ b/CRM/Upgrade/TwoOne/sql/misc.mysql @@ -4,8 +4,8 @@ -- * -- *************************************************************************/ --- Please add script for all the schema / fixed-data related modifications to --- this sql script as you resolve 2.1 issues. Include the issue number which +-- Please add script for all the schema / fixed-data related modifications to +-- this sql script as you resolve 2.1 issues. Include the issue number which -- is the source of the change, as part of the comment. @@ -29,9 +29,9 @@ ALTER TABLE `civicrm_relationship` -- Add 'My Contacts / Organizations' option in user dashboard options -UPDATE civicrm_preferences SET user_dashboard_options = CONCAT(user_dashboard_options, '56'), +UPDATE civicrm_preferences SET user_dashboard_options = CONCAT(user_dashboard_options, '56'), contact_view_options = CONCAT(contact_view_options, '1113'), - advanced_search_options = CONCAT(advanced_search_options, '121315'); + advanced_search_options = CONCAT(advanced_search_options, '121315'); -- make the dates in civicrm_contribution_recur optional @@ -45,7 +45,7 @@ ALTER TABLE `civicrm_contribution_recur` -- extend civicrm_dedupe_rule_group to the current schema -ALTER TABLE civicrm_dedupe_rule_group +ALTER TABLE civicrm_dedupe_rule_group ADD level enum('Strict', 'Fuzzy'), ADD is_default tinyint; @@ -57,14 +57,14 @@ UPDATE civicrm_dedupe_rule_group SET level = 'Fuzzy', is_default = true; -- insert the new strict dedupe_rule_group dupe rules -INSERT INTO civicrm_dedupe_rule_group (contact_type, threshold, level, is_default) +INSERT INTO civicrm_dedupe_rule_group (contact_type, threshold, level, is_default) VALUES ('Individual', 10, 'Strict', true); SELECT @drgid := MAX(id) FROM civicrm_dedupe_rule_group; INSERT INTO civicrm_dedupe_rule (dedupe_rule_group_id, rule_table, rule_field, rule_weight) VALUES (@drgid, 'civicrm_email', 'email', 10); -INSERT INTO civicrm_dedupe_rule_group (contact_type, threshold, level, is_default) +INSERT INTO civicrm_dedupe_rule_group (contact_type, threshold, level, is_default) VALUES ('Organization', 10, 'Strict', true); SELECT @drgid := MAX(id) FROM civicrm_dedupe_rule_group; @@ -72,7 +72,7 @@ INSERT INTO civicrm_dedupe_rule (dedupe_rule_group_id, rule_table, rule_field, r VALUES (@drgid, 'civicrm_contact', 'organization_name', 10), (@drgid, 'civicrm_email' , 'email', 10); -INSERT INTO civicrm_dedupe_rule_group (contact_type, threshold, level, is_default) +INSERT INTO civicrm_dedupe_rule_group (contact_type, threshold, level, is_default) VALUES ('Household', 10, 'Strict', true); SELECT @drgid := MAX(id) FROM civicrm_dedupe_rule_group; @@ -83,7 +83,7 @@ VALUES (@drgid, 'civicrm_contact', 'household_name', 10), -- Edited indexing of custom group table -ALTER TABLE `civicrm_custom_group` +ALTER TABLE `civicrm_custom_group` DROP INDEX `UI_title_domain_id` , ADD UNIQUE `UI_title_extends` ( `title` , `extends` ), DROP INDEX `UI_name_domain_id` , @@ -100,7 +100,7 @@ ALTER TABLE `civicrm_event_page` -- CRM-2488 -ALTER TABLE `civicrm_contribution_page` +ALTER TABLE `civicrm_contribution_page` ADD `is_recur_interval` tinyint(4) NULL DEFAULT '0' AFTER is_recur, ADD `recur_frequency_unit` varchar(128) NULL DEFAULT NULL AFTER is_recur; @@ -118,43 +118,43 @@ UPDATE civicrm_country SET name = 'Moldova' WHERE id = 1143; ALTER TABLE `civicrm_mapping` ADD `mapping_type_id` int(10) unsigned NULL DEFAULT NULL AFTER mapping_type; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Export Contact'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Export Contact'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Export'; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Export Contribution'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Export Contribution'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Export Contributions'; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Activity'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Activity'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Import Activity'; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Contact'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Contact'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Import'; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Contribution'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Contribution'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Import Contributions'; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Membership'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Membership'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Import Memberships'; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Participant'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Import Participant'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Import Participants'; -SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group - WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Search Builder'; +SELECT @mapvalue := value FROM civicrm_option_value, civicrm_option_group +WHERE civicrm_option_group.name = 'mapping_type' && civicrm_option_value.name = 'Search Builder'; UPDATE civicrm_mapping SET mapping_type_id = @mapvalue WHERE civicrm_mapping.mapping_type = 'Search Builder'; ALTER TABLE `civicrm_mapping` DROP `mapping_type`; -- CRM-2964 -ALTER TABLE `civicrm_contribution_page` +ALTER TABLE `civicrm_contribution_page` ADD `for_organization` text NULL DEFAULT NULL AFTER thankyou_footer, ADD `is_for_organization` tinyint(4) NULL DEFAULT '0' AFTER thankyou_footer; @@ -168,23 +168,23 @@ ALTER TABLE civicrm_uf_match ADD language VARCHAR(5) COMMENT 'UI language prefer ALTER TABLE `civicrm_custom_field` MODIFY `label` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Text for form field label (also friendly name for administering this custom property).'; -ALTER TABLE `civicrm_price_set` +ALTER TABLE `civicrm_price_set` MODIFY `title` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Displayed title for Price Set.', MODIFY `name` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Variable name/programmatic handle for this set of price fields.'; -ALTER TABLE `civicrm_price_field` +ALTER TABLE `civicrm_price_field` MODIFY `label` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Text for form field label (also friendly name for administering this field).', MODIFY `name` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Variable name/programmatic handle for this field.'; -- Modify civicrm_acl_cache -ALTER TABLE civicrm_acl_cache +ALTER TABLE civicrm_acl_cache DROP FOREIGN KEY FK_civicrm_acl_cache_contact_id, DROP FOREIGN KEY FK_civicrm_acl_cache_acl_id; ALTER TABLE civicrm_acl_cache - ADD CONSTRAINT FK_civicrm_acl_cache_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, + ADD CONSTRAINT FK_civicrm_acl_cache_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, ADD CONSTRAINT FK_civicrm_acl_cache_acl_id FOREIGN KEY (acl_id) REFERENCES civicrm_acl(id) ON DELETE CASCADE; @@ -197,23 +197,23 @@ UPDATE civicrm_relationship_type SET is_reserved = 1 WHERE id IN (4,6,7); UPDATE civicrm_state_province SET name = "Frederiksberg" WHERE id = 2261; UPDATE civicrm_state_province SET name = "Copenhagen City" WHERE id = 2262; -UPDATE civicrm_state_province SET name = "Vestsjælland" WHERE id = 2266; +UPDATE civicrm_state_province SET name = "Vestsjælland" WHERE id = 2266; UPDATE civicrm_state_province SET name = "Fyn" WHERE id = 2269; UPDATE civicrm_state_province SET name = "South Jutland" WHERE id = 2270; -UPDATE civicrm_state_province SET name = "Ringkjøbing" WHERE id = 2273; -UPDATE civicrm_state_province SET name = "Århus" WHERE id = 2274; +UPDATE civicrm_state_province SET name = "Ringkjøbing" WHERE id = 2273; +UPDATE civicrm_state_province SET name = "Ã…rhus" WHERE id = 2274; UPDATE civicrm_state_province SET name = "North Jutland" WHERE id = 2276; -INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES -(5196, 1016, "13", "Al Manāmah (Al ‘Āşimah)"), -(5197, 1016, "14", "Al Janūbīyah"), -(5199, 1016, "16", "Al Wusţá"), -(5200, 1016, "17", "Ash Shamālīyah"); +INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES +(5196, 1016, "13", "Al ManÄ�mah (Al ‘Āşimah)"), +(5197, 1016, "14", "Al JanÅ«bÄ«yah"), +(5199, 1016, "16", "Al Wusţá"), +(5200, 1016, "17", "Ash ShamÄ�lÄ«yah"); -- CRM-3435 -INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES +INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (5201, 1165, "_A", "Jenin"), (5202, 1165, "_B", "Tubas"), (5203, 1165, "_C", "Tulkarm"), @@ -234,13 +234,13 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES -- CRM-3441 -INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES +INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (10000, 1107, "CI", "Carbonia-Iglesias"), (10001, 1107, "OT", "Olbia-Tempio"), (10002, 1107, "VS", "Medio Campidano"), (10003, 1107, "OG", "Ogliastra"); -UPDATE civicrm_state_province SET name = "Forlì-Cesena" WHERE id = 3206; +UPDATE civicrm_state_province SET name = "Forlì-Cesena" WHERE id = 3206; UPDATE civicrm_state_province SET abbreviation = "FC" WHERE id = 3206; UPDATE civicrm_state_province SET abbreviation = "MC" WHERE id = 3221; UPDATE civicrm_state_province SET abbreviation = "PU" WHERE id = 3237; @@ -570,7 +570,7 @@ ALTER TABLE `civicrm_case` DROP FOREIGN KEY `FK_civicrm_case_contact_id`; ALTER TABLE `civicrm_case` DROP `contact_id`; - + ALTER TABLE `civicrm_case_activity` DROP FOREIGN KEY `FK_civicrm_case_activity_case_id`; ALTER TABLE `civicrm_case_activity` @@ -582,15 +582,15 @@ ALTER TABLE `civicrm_case_activity` SELECT @relTypeId := id FROM civicrm_relationship_type WHERE name_a_b='Employee of'; UPDATE civicrm_relationship cr -INNER JOIN civicrm_contact cci ON (cr.contact_id_a=cci.id) -INNER JOIN civicrm_contact cco ON (cr.contact_id_b=cco.id) -SET cci.employer_id = cr.contact_id_b, +INNER JOIN civicrm_contact cci ON (cr.contact_id_a=cci.id) +INNER JOIN civicrm_contact cco ON (cr.contact_id_b=cco.id) +SET cci.employer_id = cr.contact_id_b, cci.organization_name = cco.organization_name WHERE cr.relationship_type_id=@relTypeId AND cr.is_active=1 AND IF(cr.end_date IS NULL, 1, (DATEDIFF(CURDATE( ), cr.end_date) <= 0)); -- table civicrm_mailing_event_forward, adding on delete set null -ALTER TABLE `civicrm_mailing_event_forward` +ALTER TABLE `civicrm_mailing_event_forward` MODIFY dest_queue_id int(10) unsigned DEFAULT NULL COMMENT 'FK to EventQueue for destination', DROP FOREIGN KEY `FK_civicrm_mailing_event_forward_dest_queue_id`; ALTER TABLE `civicrm_mailing_event_forward` @@ -598,9 +598,9 @@ ALTER TABLE `civicrm_mailing_event_forward` -- table civicrm_payment_processor_type, insert ebay record -INSERT INTO `civicrm_payment_processor_type` +INSERT INTO `civicrm_payment_processor_type` (name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur ) -VALUES +VALUES ('eWAY', 'eWAY (Single Currency)',NULL,1,0,'Customer ID',NULL,NULL,NULL,'Payment_eWAY','https://www.eway.com.au/gateway_cvn/xmlpayment.asp',NULL,NULL,NULL,'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp',NULL,NULL,NULL,1,0); UPDATE `civicrm_payment_processor_type` diff --git a/CRM/Upgrade/TwoOne/sql/two_one_two.mysql b/CRM/Upgrade/TwoOne/sql/two_one_two.mysql index 722388c563..ea79c5d792 100644 --- a/CRM/Upgrade/TwoOne/sql/two_one_two.mysql +++ b/CRM/Upgrade/TwoOne/sql/two_one_two.mysql @@ -4,17 +4,17 @@ -- * -- *****************************************************************************/ -- fix constraint -ALTER TABLE `civicrm_group_nesting` +ALTER TABLE `civicrm_group_nesting` DROP FOREIGN KEY `FK_civicrm_group_nesting_child_group_id`; -ALTER TABLE `civicrm_group_nesting` +ALTER TABLE `civicrm_group_nesting` ADD CONSTRAINT `FK_civicrm_group_nesting_child_group_id` FOREIGN KEY (`child_group_id`) REFERENCES `civicrm_group` (`id`) ON DELETE CASCADE; -- CRM-3749 -UPDATE civicrm_uf_field SET field_type = 'Contact' +UPDATE civicrm_uf_field SET field_type = 'Contact' WHERE field_name IN ('address_name','city','contact_sub_type','contact_type','country','custom_greeting','display_name','do_not_email','do_not_mail','do_not_phone','do_not_trade','email','external_identifier','geo_code_1','geo_code_2','group','im','image_URL','id','nick_name','is_opt_out','on_hold','openid','phone','postal_code','postal_code_suffix','preferred_communication_method','preferred_mail_format','sort_name','contact_source','state_province','street_address','supplemental_address_1','supplemental_address_2','tag','user_unique_id','is_bulkmail','world_region'); -- civicrm_note constraint fix -ALTER TABLE civicrm_note +ALTER TABLE civicrm_note DROP FOREIGN KEY `FK_civicrm_note_contact_id`; ALTER TABLE `civicrm_note` ADD CONSTRAINT `FK_civicrm_note_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL; diff --git a/CRM/Upgrade/TwoTwo/Form/Step3.php b/CRM/Upgrade/TwoTwo/Form/Step3.php index b80629a1dd..2f85685787 100644 --- a/CRM/Upgrade/TwoTwo/Form/Step3.php +++ b/CRM/Upgrade/TwoTwo/Form/Step3.php @@ -105,8 +105,8 @@ class CRM_Upgrade_TwoTwo_Form_Step3 extends CRM_Upgrade_Form { */ function upgradeDomainFromEmail() { $query = " -SELECT id - FROM civicrm_option_group +SELECT id + FROM civicrm_option_group WHERE name = 'from_Email_address'"; $fmaGroup = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); @@ -125,7 +125,7 @@ VALUES ('from_email_address', 'From Email Address', 0, 1)"; //get the group id. $query = " SELECT id - FROM civicrm_option_group + FROM civicrm_option_group WHERE name = 'from_email_address'"; $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); if ($dao->fetch()) { @@ -159,8 +159,8 @@ SELECT id //make existing is_default = 0 $query = " -UPDATE civicrm_option_value - SET is_default = 0 +UPDATE civicrm_option_value + SET is_default = 0 WHERE option_group_id = %1"; $params = array(1 => array($fmaGroupId, 'Integer')); @@ -217,7 +217,7 @@ UPDATE civicrm_option_value //get the max value and wt. if ($insertEmailAddress) { $query = " -SELECT max(ROUND(civicrm_option_value.value)) as maxVal, +SELECT max(ROUND(civicrm_option_value.value)) as maxVal, max(civicrm_option_value.weight) as maxWt FROM civicrm_option_value, civicrm_option_group WHERE civicrm_option_group.name = 'from_Email_address' @@ -236,9 +236,9 @@ GROUP BY civicrm_option_group.id"; //insert domain from email address and name. $query = " -INSERT INTO `civicrm_option_value` - (`option_group_id`, `label`, `value`, `name` , `grouping`, `filter`, `is_default`, - `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) +INSERT INTO `civicrm_option_value` + (`option_group_id`, `label`, `value`, `name` , `grouping`, `filter`, `is_default`, + `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`) VALUES ( %1, %2, %3, %2, NULL, 0, 1, %4, 'Default domain email address and from name.', 0, 0, 1, NULL)"; $params = array(1 => array($fmaGroupId, 'Integer'), @@ -251,7 +251,7 @@ INSERT INTO `civicrm_option_value` //drop civicrm_domain.email_name and //civicrm_domain.email_address. - $query = " + $query = " ALTER TABLE `civicrm_domain` DROP `email_name`, DROP `email_address`"; @@ -261,7 +261,7 @@ ALTER TABLE `civicrm_domain` } /* preserve the mailer preferences from config backend to - * civicrm_preferences and unset these from config backend. + * civicrm_preferences and unset these from config backend. */ function mailerPreferences() { -- 2.25.1