+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.2.1.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $formValues.receipt_text}
- <p>{$formValues.receipt_text|htmlize}</p>
- {else}
- <p>{ts}Thank you for your support.{/ts}</p>
- {/if}
-
- <p>{ts}Please print this receipt for your records.{/ts}</p>
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Contribution Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.contributionType_name}
- </td>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney:$currency}
- </td>
- <td>
- {$line.line_total|crmMoney:$currency}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- {/if}
-
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.total_amount|crmMoney:$currency}
- </td>
- </tr>
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Received Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receipt_date}
- <tr>
- <td {$labelStyle}>
- {ts}Receipt Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receipt_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $formValues.paidBy and !$formValues.hidden_CreditCard}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.paidBy}
- </td>
- </tr>
- {if $formValues.check_number}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.check_number}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $formValues.trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction ID{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $ccContribution}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- {if $formValues.honor_first_name}
- <tr>
- <th {$headerStyle}>
- {$formValues.honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$formValues.honor_prefix} {$formValues.honor_first_name} {$formValues.honor_last_name}<br />
- {if $formValues.honor_email}
- {ts}Honoree Email{/ts}: {$formValues.honor_email}
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $formValues.product_name}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$formValues.product_name}
- </td>
- </tr>
- {if $formValues.product_option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.product_option}
- </td>
- </tr>
- {/if}
- {if $formValues.product_sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.product_sku}
- </td>
- </tr>
- {/if}
- {if $fulfilled_date}
- <tr>
- <td {$labelStyle}>
- {ts}Sent{/ts}
- </td>
- <td {$valueStyle}>
- {$fulfilled_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $formValues.receipt_text}
-{$formValues.receipt_text}
-{else}{ts}Thank you for your support.{/ts}{/if}
-
-{ts}Please print this receipt for your records.{/ts}
-
-
-===========================================================
-{ts}Contribution Information{/ts}
-
-===========================================================
-{ts}Contribution Type{/ts}: {$formValues.contributionType_name}
-{if $lineItem}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {$line.line_total|crmMoney:$currency|string_format:"%10s"}
-{/foreach}
-{/foreach}
-{/if}
-
-{ts}Total Amount{/ts}: {$formValues.total_amount|crmMoney:$currency}
-{if $receive_date}
-{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
-{/if}
-{if $receipt_date}
-{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
-{/if}
-{if $formValues.paidBy and !$formValues.hidden_CreditCard}
-{ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
-{ts}Check Number{/ts}: {$formValues.check_number}
-{/if}
-{/if}
-{if $formValues.trxn_id}
-{ts}Transaction ID{/ts}: {$formValues.trxn_id}
-{/if}
-
-{if $ccContribution}
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-===========================================================
-{$customName}
-===========================================================
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
-{if $formValues.honor_first_name}
-
-===========================================================
-{$formValues.honor_type}
-===========================================================
-{$formValues.honor_prefix} {$formValues.honor_first_name} {$formValues.honor_last_name}
-{if $formValues.honor_email}
-{ts}Honoree Email{/ts}: {$formValues.honor_email}
-{/if}
-{/if}
-
-{if $formValues.product_name}
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$formValues.product_name}
-{if $formValues.product_option}
-{ts}Option{/ts}: {$formValues.product_option}
-{/if}
-{if $formValues.product_sku}
-{ts}SKU{/ts}: {$formValues.product_sku}
-{/if}
-{if $fulfilled_date}
-{ts}Sent{/ts}: {$fulfilled_date|crmDate}
-{/if}
-{/if}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Contribution Information{/ts}
- </th>
- </tr>
-
- {if $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney:$currency}
- </td>
- <td>
- {$line.line_total|crmMoney:$currency}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency}
- </td>
- </tr>
-
- {else}
-
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $is_recur}
- {if $contributeMode eq 'notify'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can modify or cancel future contributions by <a href="%1">logging in to your account</a>.{/ts}
- </td>
- </tr>
- {elseif $contributeMode eq 'directIPN' and $receiptFromEmail}
- <tr>
- <td {$labelStyle}>
- {ts 1=$receiptFromEmail}This is a recurring contribution. To modify or cancel future contributions please contact us at %1.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfName}
- <tr>
- <th {$headerStyle}>
- {ts}On Behalf Of{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$onBehalfName}<br />
- {$onBehalfAddress|nl2br}<br />
- {$onBehalfEmail}
- </td>
- </tr>
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $receipt_text}
-{$receipt_text}
-{/if}
-{if $is_pay_later}
-
-===========================================================
-{$pay_later_receipt}
-===========================================================
-{else}
-
-{ts}Please print this receipt for your records.{/ts}
-{/if}
-
-{if $amount}
-===========================================================
-{ts}Contribution Information{/ts}
-
-===========================================================
-{if $lineItem and $priceSetID}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {$line.line_total|crmMoney:$currency|string_format:"%10s"}
-{/foreach}
-{/foreach}
-
-{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
-{else}
-{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if $amount_level } - {$amount_level} {/if}
-{/if}
-{/if}
-{if $receive_date}
-
-{ts}Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $is_monetary and $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-
-{if $is_recur}
-{if $contributeMode eq 'notify'}
-{ts}This is a recurring contribution. You can modify or cancel future contributions by logging in to your account at:{/ts}
-
-{$cancelSubscriptionUrl}
-{elseif $contributeMode eq 'directIPN' and $receiptFromEmail}
-{ts 1=$receiptFromEmail}This is a recurring contribution. To modify or cancel future contributions please contact us at %1.{/ts}
-
-{/if}
-{/if}
-
-{if $honor_block_is_active }
-===========================================================
-{$honor_type}
-===========================================================
-{$honor_prefix} {$honor_first_name} {$honor_last_name}
-{if $honor_email}
-{ts}Honoree Email{/ts}: {$honor_email}
-{/if}
-
-{/if}
-{if $pcpBlock}
-===========================================================
-{ts}Personal Campaign Page{/ts}
-
-===========================================================
-{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
-
-{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
-
-{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
-
-{/if}
-{if $onBehalfName}
-===========================================================
-{ts}On Behalf Of{/ts}
-
-===========================================================
-{$onBehalfName}
-{$onBehalfAddress}
-
-{$onBehalfEmail}
-
-{/if}
-
-{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
-{if $is_pay_later}
-===========================================================
-{ts}Registered Email{/ts}
-
-===========================================================
-{$email}
-{elseif $amount GT 0}
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-{$email}
-{/if} {* End ! is_pay_later condition. *}
-{/if}
-{if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-
-{if $selectPremium }
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$product_name}
-{if $option}
-{ts}Option{/ts}: {$option}
-{/if}
-{if $sku}
-{ts}SKU{/ts}: {$sku}
-{/if}
-{if $start_date}
-{ts}Start Date{/ts}: {$start_date|crmDate}
-{/if}
-{if $end_date}
-{ts}End Date{/ts}: {$end_date|crmDate}
-{/if}
-{if $contact_email OR $contact_phone}
-
-{ts}For information about this premium, contact:{/ts}
-
-{if $contact_email}
- {$contact_email}
-{/if}
-{if $contact_phone}
- {$contact_phone}
-{/if}
-{/if}
-{if $is_deductible AND $price}
-
-{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
-{/if}
-
-{if $customPre}
-===========================================================
-{$customPre_grouptitle}
-
-===========================================================
-{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
-
-
-{if $customPost}
-===========================================================
-{$customPost_grouptitle}
-
-===========================================================
-{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.2.alpha1.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-{if $idHash}[case #{$idHash}]{/if} {$activitySubject}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
- <p>{$event.confirm_email_text|htmlize}</p>
- {/if}
-
- {if $isOnWaitlist}
- <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
- <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
- {/if}
- {elseif $isRequireApproval}
- <p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
- <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
- {/if}
- {elseif $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Event Information and Location{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$event.event_title}<br />
- {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
- </td>
- </tr>
-
- {if $event.participant_role neq 'Attendee' and $defaultRole}
- <tr>
- <td {$labelStyle}>
- {ts}Participant Role{/ts}
- </td>
- <td {$valueStyle}>
- {$event.participant_role}
- </td>
- </tr>
- {/if}
-
- {if $isShowLocation}
- <tr>
- <td colspan="2" {$valueStyle}>
- {if $location.address.1.name}
- {$location.address.1.name}<br />
- {/if}
- {if $location.address.1.street_address}
- {$location.address.1.street_address}<br />
- {/if}
- {if $location.address.1.supplemental_address_1}
- {$location.address.1.supplemental_address_1}<br />
- {/if}
- {if $location.address.1.supplemental_address_2}
- {$location.address.1.supplemental_address_2}<br />
- {/if}
- {if $location.address.1.city}
- {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $location.phone.1.phone || $location.email.1.email}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts}Event Contacts:{/ts}
- </td>
- </tr>
- {foreach from=$location.phone item=phone}
- {if $phone.phone}
- <tr>
- <td {$labelStyle}>
- {if $phone.phone_type}
- {$phone.phone_type_display}
- {else}
- {ts}Phone{/ts}
- {/if}
- </td>
- <td {$valueStyle}>
- {$phone.phone}
- </td>
- </tr>
- {/if}
- {/foreach}
- {foreach from=$location.email item=eventEmail}
- {if $eventEmail.email}
- <tr>
- <td {$labelStyle}>
- {ts}Email{/ts}
- </td>
- <td {$valueStyle}>
- {$eventEmail.email}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
- <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
- </td>
- </tr>
- {if $email}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {/if}
-
-
- {if $event.is_monetary}
-
- <tr>
- <th {$headerStyle}>
- {$event.fee_label}
- </th>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- {if $value neq 'skip'}
- {if $isPrimary}
- {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts 1=$priceset+1}Participant %1{/ts}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- {if $participantCount }<th>{ts}Total Participants{/ts}</th>{/if}
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- {if $participantCount }
- <td>
- {$line.participant_count}
- </td>
- {/if}
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $amount && !$lineItem}
- {foreach from=$amount item=amnt key=level}
- <tr>
- <td colspan="2" {$valueStyle}>
- {$amnt.amount|crmMoney} {$amnt.label}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if $isPrimary}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
- </td>
- </tr>
- {if $participantCount }
- <tr>
- <td {$labelStyle}>
- {ts}Total Participants{/ts}</td>
- <td {$valueStyle}>
- {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}
- </td>
- </tr>
- {/if}
- {if $is_pay_later}
- <tr>
- <td colspan="2" {$labelStyle}>
- {$pay_later_receipt}
- </td>
- </tr>
- {/if}
-
- {if $register_date}
- <tr>
- <td {$labelStyle}>
- {ts}Registration Date{/ts}
- </td>
- <td {$valueStyle}>
- {$register_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $contributionTypeName}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$contributionTypeName}
- </td>
- </tr>
- {/if}
-
- {if $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$paidBy}
- </td>
- </tr>
- {/if}
-
- {if $checkNumber}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$checkNumber}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {/if}
-
- {/if} {* End of conditional section for Paid events *}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customProfile}
- {foreach from=$customProfile item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {ts 1=$customName+1}Participant Information - Participant %1{/ts}
- </th>
- <tr>
- {foreach from=$value item=val key=field}
- {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
- <tr>
- <td colspan="2" {$labelStyle}>
- {if $field eq 'additionalCustomPre'}
- {$additionalCustomPre_grouptitle}
- {else}
- {$additionalCustomPost_grouptitle}
- {/if}
- </td>
- </tr>
- {foreach from=$val item=v key=f}
- <tr>
- <td {$labelStyle}>
- {$f}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/if}
- {/foreach}
- {/foreach}
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
-{$event.confirm_email_text}
-{/if}
-
-{if $isOnWaitlist}
-==========================================================={if $participantCount }===================={/if}
-
-{ts}You have been added to the WAIT LIST for this event.{/ts}
-
-{if $isPrimary}
-{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
-
-{/if}
-==========================================================={if $participantCount }===================={/if}
-
-{elseif $isRequireApproval}
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Your registration has been submitted.{/ts}
-
-{if $isPrimary}
-{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
-
-{/if}
-==========================================================={if $participantCount }===================={/if}
-
-{elseif $is_pay_later}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $participantCount }===================={/if}
-
-{else}
-
-{ts}Please print this confirmation for your records.{/ts}
-{/if}
-
-
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Event Information and Location{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$event.event_title}
-{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
-
-{if $event.participant_role neq 'Attendee' and $defaultRole}
-{ts}Participant Role{/ts}: {$event.participant_role}
-{/if}
-
-{if $isShowLocation}
-{if $location.address.1.name}
-
-{$location.address.1.name}
-{/if}
-{if $location.address.1.street_address}{$location.address.1.street_address}
-{/if}
-{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
-{/if}
-{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
-{/if}
-{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
-{/if}
-
-{/if}{*End of isShowLocation condition*}
-
-{if $location.phone.1.phone || $location.email.1.email}
-
-{ts}Event Contacts:{/ts}
-{foreach from=$location.phone item=phone}
-{if $phone.phone}
-
-{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
-{/foreach}
-{foreach from=$location.email item=eventEmail}
-{if $eventEmail.email}
-
-{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
-{/if}
-
-{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
-{ts}Download iCalendar File:{/ts} {$icalFeed}
-{if $email}
-
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Registered Email{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$email}
-{/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$event.fee_label}
-==========================================================={if $participantCount }===================={/if}
-
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
-
-{if $value neq 'skip'}
-{if $isPrimary}
-{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
-{ts 1=$priceset+1}Participant %1{/ts}
-{/if}
-{/if}
----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{capture assign=ts_participant_total}{if $participantCount }{ts}Total Participants{/ts}{/if}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{foreach from=$value item=line}
-{if $participantCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"} {$ts_participant_count|string_format:"%10s"}
-{/foreach}
-{/if}
-{/foreach}
-{/if}
-{if $amount && !$lineItem}
-{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
-{/foreach}
-{/if}
-{if $isPrimary }
-
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
-
-{if $participantCount }
- {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}
-
-{ts}Total Participants{/ts}: {$count}
-{/if}
-
-{if $is_pay_later }
-
-==========================================================={if $participantCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $participantCount }===================={/if}
-
-{/if}
-
-{if $register_date}
-{ts}Registration Date{/ts}: {$register_date|crmDate}
-{/if}
-{if $receive_date}
-{ts}Transaction Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $contributionTypeName}
-{ts}Contribution Type{/ts}: {$contributionTypeName}
-{/if}
-{if $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-{if $paidBy}
-{ts}Paid By{/ts}: {$paidBy}
-{/if}
-{if $checkNumber}
-{ts}Check Number{/ts}: {$checkNumber}
-{/if}
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Billing Name and Address{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-===========================================================
-{ts}Credit Card Information{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-{/if} {* End of conditional section for Paid events *}
-
-{if $customPre}
-==========================================================={if $participantCount }===================={/if}
-
-{$customPre_grouptitle}
-==========================================================={if $participantCount }===================={/if}
-
-{foreach from=$customPre item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-
-{if $customPost}
-==========================================================={if $participantCount }===================={/if}
-
-{$customPost_grouptitle}
-==========================================================={if $participantCount }===================={/if}
-
-{foreach from=$customPost item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-{if $customProfile}
-
-{foreach from=$customProfile item=value key=customName}
-==========================================================={if $participantCount }===================={/if}
-
-{ts 1=$customName+1}Participant Information - Participant %1{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{foreach from=$value item=val key=field}
-{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
-{if $field eq 'additionalCustomPre' }
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{$additionalCustomPre_grouptitle}
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{else}
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{$additionalCustomPost_grouptitle}
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{/if}
-{foreach from=$val item=v key=f}
-{$f}: {$v}
-{/foreach}
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-=========================================================={if $participantCount }===================={/if}
-
-{$customName}
-=========================================================={if $participantCount }===================={/if}
-
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
-
-
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
- <p>{$event.confirm_email_text|htmlize}</p>
- {/if}
-
- {if $isOnWaitlist}
- <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
- <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
- {/if}
- {elseif $isRequireApproval}
- <p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
- <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
- {/if}
- {elseif $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Event Information and Location{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$event.event_title}<br />
- {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
- </td>
- </tr>
-
- {if $event.participant_role neq 'Attendee' and $defaultRole}
- <tr>
- <td {$labelStyle}>
- {ts}Participant Role{/ts}
- </td>
- <td {$valueStyle}>
- {$event.participant_role}
- </td>
- </tr>
- {/if}
-
- {if $isShowLocation}
- <tr>
- <td colspan="2" {$valueStyle}>
- {if $location.address.1.name}
- {$location.address.1.name}<br />
- {/if}
- {if $location.address.1.street_address}
- {$location.address.1.street_address}<br />
- {/if}
- {if $location.address.1.supplemental_address_1}
- {$location.address.1.supplemental_address_1}<br />
- {/if}
- {if $location.address.1.supplemental_address_2}
- {$location.address.1.supplemental_address_2}<br />
- {/if}
- {if $location.address.1.city}
- {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $location.phone.1.phone || $location.email.1.email}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts}Event Contacts:{/ts}
- </td>
- </tr>
- {foreach from=$location.phone item=phone}
- {if $phone.phone}
- <tr>
- <td {$labelStyle}>
- {if $phone.phone_type}
- {$phone.phone_type_display}
- {else}
- {ts}Phone{/ts}
- {/if}
- </td>
- <td {$valueStyle}>
- {$phone.phone}
- </td>
- </tr>
- {/if}
- {/foreach}
- {foreach from=$location.email item=eventEmail}
- {if $eventEmail.email}
- <tr>
- <td {$labelStyle}>
- {ts}Email{/ts}
- </td>
- <td {$valueStyle}>
- {$eventEmail.email}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
- <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
- </td>
- </tr>
- {if $email}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {/if}
-
-
- {if $event.is_monetary}
-
- <tr>
- <th {$headerStyle}>
- {$event.fee_label}
- </th>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- {if $value neq 'skip'}
- {if $isPrimary}
- {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts 1=$priceset+1}Participant %1{/ts}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- {if $participantCount }<th>{ts}Total Participants{/ts}</th>{/if}
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- {if $participantCount }<td>{$line.participant_count}</td> {/if}
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $amount && !$lineItem}
- {foreach from=$amount item=amnt key=level}
- <tr>
- <td colspan="2" {$valueStyle}>
- {$amnt.amount|crmMoney} {$amnt.label}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if $isPrimary}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
- </td>
- </tr>
- {if $participantCount }
- <tr>
- <td {$labelStyle}>
- {ts}Total Participants{/ts}</td>
- <td {$valueStyle}>
- {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}
- </td> </tr>
- {/if}
- {if $is_pay_later}
- <tr>
- <td colspan="2" {$labelStyle}>
- {$pay_later_receipt}
- </td>
- </tr>
- {/if}
-
- {if $register_date}
- <tr>
- <td {$labelStyle}>
- {ts}Registration Date{/ts}
- </td>
- <td {$valueStyle}>
- {$register_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $contributionTypeName}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$contributionTypeName}
- </td>
- </tr>
- {/if}
-
- {if $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$paidBy}
- </td>
- </tr>
- {/if}
-
- {if $checkNumber}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$checkNumber}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {/if}
-
- {/if} {* End of conditional section for Paid events *}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customProfile}
- {foreach from=$customProfile item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {ts 1=$customName+1}Participant Information - Participant %1{/ts}
- </th>
- <tr>
- {foreach from=$value item=val key=field}
- {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
- <tr>
- <td colspan="2" {$labelStyle}>
- {if $field eq 'additionalCustomPre'}
- {$additionalCustomPre_grouptitle}
- {else}
- {$additionalCustomPost_grouptitle}
- {/if}
- </td>
- </tr>
- {foreach from=$val item=v key=f}
- <tr>
- <td {$labelStyle}>
- {$f}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/if}
- {/foreach}
- {/foreach}
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
-{$event.confirm_email_text}
-{/if}
-
-{if $isOnWaitlist}
-==========================================================={if $participantCount }===================={/if}
-
-{ts}You have been added to the WAIT LIST for this event.{/ts}
-
-{if $isPrimary}
-{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
-{/if}
-==========================================================={if $participantCount }===================={/if}
-
-{elseif $isRequireApproval}
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Your registration has been submitted.{/ts}
-
-{if $isPrimary}
-{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
-
-{/if}
-==========================================================={if $participantCount }===================={/if}
-
-{elseif $is_pay_later}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $participantCount }===================={/if}
-
-{else}
-
-{ts}Please print this confirmation for your records.{/ts}
-{/if}
-
-
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Event Information and Location{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$event.event_title}
-{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
-
-{if $event.participant_role neq 'Attendee' and $defaultRole}
-{ts}Participant Role{/ts}: {$event.participant_role}
-{/if}
-
-{if $isShowLocation}
-{if $location.address.1.name}
-
-{$location.address.1.name}
-{/if}
-{if $location.address.1.street_address}{$location.address.1.street_address}
-{/if}
-{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
-{/if}
-{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
-{/if}
-{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
-{/if}
-
-{/if}{*End of isShowLocation condition*}
-
-{if $location.phone.1.phone || $location.email.1.email}
-
-{ts}Event Contacts:{/ts}
-{foreach from=$location.phone item=phone}
-{if $phone.phone}
-
-{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
-{/foreach}
-{foreach from=$location.email item=eventEmail}
-{if $eventEmail.email}
-
-{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
-{/if}
-
-{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
-{ts}Download iCalendar File:{/ts} {$icalFeed}
-{if $email}
-
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Registered Email{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$email}
-{/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$event.fee_label}
-==========================================================={if $participantCount }===================={/if}
-
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
-
-{if $value neq 'skip'}
-{if $isPrimary}
-{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
-{ts 1=$priceset+1}Participant %1{/ts}
-
-{/if}
-{/if}
------------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{if $participantCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
------------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{foreach from=$value item=line}
-{if $participantCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
-{/foreach}
-{/if}
-{/foreach}
-{/if}
-{if $amount && !$lineItem}
-{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
-{/foreach}
-{/if}
-{if $isPrimary }
-
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
-
-{if $participantCount }
- {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}
-
-{ts}Total Participants{/ts}: {$count}
-{/if}
-
-{if $is_pay_later }
-
-==========================================================={if $participantCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $participantCount }===================={/if}
-
-{/if}
-
-{if $register_date}
-{ts}Registration Date{/ts}: {$register_date|crmDate}
-{/if}
-{if $receive_date}
-{ts}Transaction Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $contributionTypeName}
-{ts}Contribution Type{/ts}: {$contributionTypeName}
-{/if}
-{if $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-{if $paidBy}
-{ts}Paid By{/ts}: {$paidBy}
-{/if}
-{if $checkNumber}
-{ts}Check Number{/ts}: {$checkNumber}
-{/if}
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Billing Name and Address{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-==========================================================={if $participantCount }===================={/if}
-
-{ts}Credit Card Information{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-{/if} {* End of conditional section for Paid events *}
-
-{if $customPre}
-==========================================================={if $participantCount }===================={/if}
-
-{$customPre_grouptitle}
-==========================================================={if $participantCount }===================={/if}
-
-{foreach from=$customPre item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-
-{if $customPost}
-==========================================================={if $participantCount }===================={/if}
-
-{$customPost_grouptitle}
-==========================================================={if $participantCount }===================={/if}
-
-{foreach from=$customPost item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-{if $customProfile}
-
-{foreach from=$customProfile item=value key=customName}
-==========================================================={if $participantCount }===================={/if}
-
-{ts 1=$customName+1}Participant Information - Participant %1{/ts}
-
-==========================================================={if $participantCount }===================={/if}
-
-{foreach from=$value item=val key=field}
-{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
-{if $field eq 'additionalCustomPre' }
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{$additionalCustomPre_grouptitle}
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{else}
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{$additionalCustomPost_grouptitle}
-----------------------------------------------------------{if $participantCount }--------------------{/if}
-
-{/if}
-{foreach from=$val item=v key=f}
-{$f}: {$v}
-{/foreach}
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-=========================================================={if $participantCount }===================={/if}
-
-{$customName}
-=========================================================={if $participantCount }===================={/if}
-
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.2.alpha2.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $formValues.receipt_text}
- <p>{$formValues.receipt_text|htmlize}</p>
- {else}
- <p>{ts}Thank you for your support.{/ts}</p>
- {/if}
-
- <p>{ts}Please print this receipt for your records.{/ts}</p>
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Contribution Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.contributionType_name}
- </td>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- {/if}
-
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.total_amount|crmMoney}
- </td>
- </tr>
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Received Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receipt_date}
- <tr>
- <td {$labelStyle}>
- {ts}Receipt Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receipt_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $formValues.paidBy and !$formValues.hidden_CreditCard}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.paidBy}
- </td>
- </tr>
- {if $formValues.check_number}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.check_number}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $formValues.trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction ID{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $ccContribution}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- {if $formValues.honor_first_name}
- <tr>
- <th {$headerStyle}>
- {$formValues.honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$formValues.honor_prefix} {$formValues.honor_first_name} {$formValues.honor_last_name}<br />
- {if $formValues.honor_email}
- {ts}Honoree Email{/ts}: {$formValues.honor_email}
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $formValues.product_name}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$formValues.product_name}
- </td>
- </tr>
- {if $formValues.product_option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.product_option}
- </td>
- </tr>
- {/if}
- {if $formValues.product_sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.product_sku}
- </td>
- </tr>
- {/if}
- {if $fulfilled_date}
- <tr>
- <td {$labelStyle}>
- {ts}Sent{/ts}
- </td>
- <td {$valueStyle}>
- {$fulfilled_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $formValues.receipt_text}
-{$formValues.receipt_text}
-{else}{ts}Thank you for your support.{/ts}{/if}
-
-{ts}Please print this receipt for your records.{/ts}
-
-
-===========================================================
-{ts}Contribution Information{/ts}
-
-===========================================================
-{ts}Contribution Type{/ts}: {$formValues.contributionType_name}
-{if $lineItem}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
-{/foreach}
-{/foreach}
-{/if}
-
-{ts}Total Amount{/ts}: {$formValues.total_amount|crmMoney}
-{if $receive_date}
-{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
-{/if}
-{if $receipt_date}
-{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
-{/if}
-{if $formValues.paidBy and !$formValues.hidden_CreditCard}
-{ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
-{ts}Check Number{/ts}: {$formValues.check_number}
-{/if}
-{/if}
-{if $formValues.trxn_id}
-{ts}Transaction ID{/ts}: {$formValues.trxn_id}
-{/if}
-
-{if $ccContribution}
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-===========================================================
-{$customName}
-===========================================================
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
-{if $formValues.honor_first_name}
-
-===========================================================
-{$formValues.honor_type}
-===========================================================
-{$formValues.honor_prefix} {$formValues.honor_first_name} {$formValues.honor_last_name}
-{if $formValues.honor_email}
-{ts}Honoree Email{/ts}: {$formValues.honor_email}
-{/if}
-{/if}
-
-{if $formValues.product_name}
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$formValues.product_name}
-{if $formValues.product_option}
-{ts}Option{/ts}: {$formValues.product_option}
-{/if}
-{if $formValues.product_sku}
-{ts}SKU{/ts}: {$formValues.product_sku}
-{/if}
-{if $fulfilled_date}
-{ts}Sent{/ts}: {$fulfilled_date|crmDate}
-{/if}
-{/if}
+++ /dev/null
--- CRM-6138
--- language list from http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
--- most common languages, according to http://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers enabled
-
-INSERT INTO `civicrm_option_group`
- (`name`, {localize field='description}`description`{/localize}, `is_reserved`, `is_active`)
-VALUES
- ('languages', {localize}'{ts escape="sql"}List of Languages{/ts}'{/localize}, 0, 1);
-
-SELECT @option_group_id_languages := max(id) from civicrm_option_group where name = 'languages';
-
-SELECT @counter := 0;
-INSERT INTO civicrm_option_value
- (option_group_id, is_default, is_active, name, value, {localize field='label'}label{/localize}, weight)
-VALUES
- (@option_group_id_languages, 0, 0, '', 'ab', {localize}'Abkhaz'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'aa', {localize}'Afar'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'af', {localize}'Afrikaans'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ak', {localize}'Akan'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sq', {localize}'Albanian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'am', {localize}'Amharic'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ar', {localize}'Arabic'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'an', {localize}'Aragonese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'hy', {localize}'Armenian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'as', {localize}'Assamese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'av', {localize}'Avaric'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ae', {localize}'Avestan'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ay', {localize}'Aymara'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'az', {localize}'Azerbaijani'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'bm', {localize}'Bambara'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ba', {localize}'Bashkir'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'eu', {localize}'Basque'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'be', {localize}'Belarusian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'bn', {localize}'Bengali'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'bh', {localize}'Bihari'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'bi', {localize}'Bislama'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'bs', {localize}'Bosnian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'br', {localize}'Breton'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'bg', {localize}'Bulgarian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'my', {localize}'Burmese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ca', {localize}'Catalan; Valencian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ch', {localize}'Chamorro'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ce', {localize}'Chechen'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ny', {localize}'Chichewa; Chewa; Nyanja'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'zh', {localize}'Chinese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'cv', {localize}'Chuvash'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kw', {localize}'Cornish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'co', {localize}'Corsican'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'cr', {localize}'Cree'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'hr', {localize}'Croatian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'cs', {localize}'Czech'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'da', {localize}'Danish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'dv', {localize}'Divehi; Dhivehi; Maldivian;'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'nl', {localize}'Dutch'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'dz', {localize}'Dzongkha'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 1, 1, '', 'en', {localize}'English'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'eo', {localize}'Esperanto'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'et', {localize}'Estonian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ee', {localize}'Ewe'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'fo', {localize}'Faroese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'fj', {localize}'Fijian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'fi', {localize}'Finnish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'fr', {localize}'French'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ff', {localize}'Fula; Fulah; Pulaar; Pular'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'gl', {localize}'Galician'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ka', {localize}'Georgian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'de', {localize}'German'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'el', {localize}'Greek, Modern'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'gn', {localize}'Guaraní'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'gu', {localize}'Gujarati'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ht', {localize}'Haitian; Haitian Creole'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ha', {localize}'Hausa'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'he', {localize}'Hebrew (modern)'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'hz', {localize}'Herero'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'hi', {localize}'Hindi'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ho', {localize}'Hiri Motu'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'hu', {localize}'Hungarian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ia', {localize}'Interlingua'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'id', {localize}'Indonesian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ie', {localize}'Interlingue'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ga', {localize}'Irish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ig', {localize}'Igbo'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ik', {localize}'Inupiaq'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'io', {localize}'Ido'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'is', {localize}'Icelandic'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'it', {localize}'Italian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'iu', {localize}'Inuktitut'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ja', {localize}'Japanese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'jv', {localize}'Javanese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kl', {localize}'Kalaallisut, Greenlandic'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kn', {localize}'Kannada'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kr', {localize}'Kanuri'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ks', {localize}'Kashmiri'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kk', {localize}'Kazakh'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'km', {localize}'Khmer'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ki', {localize}'Kikuyu, Gikuyu'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'rw', {localize}'Kinyarwanda'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ky', {localize}'Kirghiz, Kyrgyz'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kv', {localize}'Komi'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kg', {localize}'Kongo'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ko', {localize}'Korean'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ku', {localize}'Kurdish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'kj', {localize}'Kwanyama, Kuanyama'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'la', {localize}'Latin'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'lb', {localize}'Luxembourgish, Letzeburgesch'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'lg', {localize}'Luganda'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'li', {localize}'Limburgish, Limburgan, Limburger'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ln', {localize}'Lingala'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'lo', {localize}'Lao'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'lt', {localize}'Lithuanian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'lu', {localize}'Luba-Katanga'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'lv', {localize}'Latvian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'gv', {localize}'Manx'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'mk', {localize}'Macedonian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'mg', {localize}'Malagasy'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ms', {localize}'Malay'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ml', {localize}'Malayalam'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'mt', {localize}'Maltese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'mi', {localize}'Māori'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'mr', {localize}'Marathi'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'mh', {localize}'Marshallese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'mn', {localize}'Mongolian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'na', {localize}'Nauru'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'nv', {localize}'Navajo, Navaho'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'nb', {localize}'Norwegian Bokmål'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'nd', {localize}'North Ndebele'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ne', {localize}'Nepali'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ng', {localize}'Ndonga'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'nn', {localize}'Norwegian Nynorsk'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'no', {localize}'Norwegian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ii', {localize}'Nuosu'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'nr', {localize}'South Ndebele'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'oc', {localize}'Occitan (after 1500)'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'oj', {localize}'Ojibwa'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'cu', {localize}'Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'om', {localize}'Oromo'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'or', {localize}'Oriya'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'os', {localize}'Ossetian, Ossetic'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'pa', {localize}'Panjabi, Punjabi'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'pi', {localize}'Pāli'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'fa', {localize}'Persian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'pl', {localize}'Polish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ps', {localize}'Pashto, Pushto'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'pt', {localize}'Portuguese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'qu', {localize}'Quechua'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'rm', {localize}'Romansh'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'rn', {localize}'Kirundi'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ro', {localize}'Romanian, Moldavian, Moldovan'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'ru', {localize}'Russian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sa', {localize}'Sanskrit'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sc', {localize}'Sardinian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sd', {localize}'Sindhi'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'se', {localize}'Northern Sami'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sm', {localize}'Samoan'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sg', {localize}'Sango'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sr', {localize}'Serbian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'gd', {localize}'Scottish Gaelic; Gaelic'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sn', {localize}'Shona'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'si', {localize}'Sinhala, Sinhalese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sk', {localize}'Slovak'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sl', {localize}'Slovene'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'so', {localize}'Somali'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'st', {localize}'Southern Sotho'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'es', {localize}'Spanish; Castilian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'su', {localize}'Sundanese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'sw', {localize}'Swahili'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ss', {localize}'Swati'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 1, '', 'sv', {localize}'Swedish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ta', {localize}'Tamil'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'te', {localize}'Telugu'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'tg', {localize}'Tajik'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'th', {localize}'Thai'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ti', {localize}'Tigrinya'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'bo', {localize}'Tibetan Standard, Tibetan, Central'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'tk', {localize}'Turkmen'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'tl', {localize}'Tagalog'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'tn', {localize}'Tswana'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'to', {localize}'Tonga (Tonga Islands)'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'tr', {localize}'Turkish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ts', {localize}'Tsonga'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'tt', {localize}'Tatar'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'tw', {localize}'Twi'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ty', {localize}'Tahitian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ug', {localize}'Uighur, Uyghur'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'uk', {localize}'Ukrainian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'ur', {localize}'Urdu'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'uz', {localize}'Uzbek'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 've', {localize}'Venda'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'vi', {localize}'Vietnamese'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'vo', {localize}'Volapük'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'wa', {localize}'Walloon'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'cy', {localize}'Welsh'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'wo', {localize}'Wolof'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'fy', {localize}'Western Frisian'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'xh', {localize}'Xhosa'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'yi', {localize}'Yiddish'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'yo', {localize}'Yoruba'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'za', {localize}'Zhuang, Chuang'{/localize}, @counter := @counter + 1),
- (@option_group_id_languages, 0, 0, '', 'zu', {localize}'Zulu'{/localize}, @counter := @counter + 1);
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.2.alpha3.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Activity Summary{/ts} - {$activityTypeName}
- </th>
- </tr>
- {if $isCaseActivity}
- <tr>
- <td {$labelStyle}>
- {ts}Your Case Role(s){/ts}
- </td>
- <td {$valueStyle}>
- {$contact.role}
- </td>
- </tr>
- {/if}
- {if $editActURL}
- <tr>
- <td colspan="2" {$valueStyle}>
- <a href="{$editActURL}" title="{ts}Edit activity{/ts}">{ts}Edit activity{/ts}</a>
- </td>
- </tr>
- {/if}
- {if $viewActURL}
- <tr>
- <td colspan="2" {$valueStyle}>
- <a href="{$viewActURL}" title="{ts}View activity{/ts}">{ts}View activity{/ts}</a>
- </td>
- </tr>
- {/if}
- {foreach from=$activity.fields item=field}
- <tr>
- <td {$labelStyle}>
- {$field.label}{if $field.category}({$field.category}){/if}
- </td>
- <td {$valueStyle}>
- {if $field.type eq 'Date'}
- {$field.value|crmDate:$config->dateformatDatetime}
- {else}
- {$field.value}
- {/if}
- </td>
- </tr>
- {/foreach}
-
- {foreach from=$activity.customGroups key=customGroupName item=customGroup}
- <tr>
- <th {$headerStyle}>
- {$customGroupName}
- </th>
- </tr>
- {foreach from=$customGroup item=field}
- <tr>
- <td {$labelStyle}>
- {$field.label}
- </td>
- <td {$valueStyle}>
- {if $field.type eq 'Date'}
- {$field.value|crmDate:$config->dateformatDatetime}
- {else}
- {$field.value}
- {/if}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- </table>
- </td>
- </tr>
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-===========================================================
-{ts}Activity Summary{/ts} - {$activityTypeName}
-===========================================================
-{if $isCaseActivity}
-{ts}Your Case Role(s){/ts} : {$contact.role}
-{/if}
-
-{if $editActURL}
-{ts}Edit activity{/ts} : {$editActURL}
-{/if}
-{if $viewActURL}
-{ts}View 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}
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.3.2.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Activity Summary{/ts} - {$activityTypeName}
- </th>
- </tr>
- {if $isCaseActivity}
- <tr>
- <td {$labelStyle}>
- {ts}Your Case Role(s){/ts}
- </td>
- <td {$valueStyle}>
- {$contact.role}
- </td>
- </tr>
- {if $manageCaseURL}
- <tr>
- <td colspan="2" {$valueStyle}>
- <a href="{$manageCaseURL}" title="{ts}Manage Case{/ts}">{ts}Manage Case{/ts}</a>
- </td>
- </tr>
- {/if}
- {/if}
- {if $editActURL}
- <tr>
- <td colspan="2" {$valueStyle}>
- <a href="{$editActURL}" title="{ts}Edit activity{/ts}">{ts}Edit activity{/ts}</a>
- </td>
- </tr>
- {/if}
- {if $viewActURL}
- <tr>
- <td colspan="2" {$valueStyle}>
- <a href="{$viewActURL}" title="{ts}View activity{/ts}">{ts}View activity{/ts}</a>
- </td>
- </tr>
- {/if}
- {foreach from=$activity.fields item=field}
- <tr>
- <td {$labelStyle}>
- {$field.label}{if $field.category}({$field.category}){/if}
- </td>
- <td {$valueStyle}>
- {if $field.type eq 'Date'}
- {$field.value|crmDate:$config->dateformatDatetime}
- {else}
- {$field.value}
- {/if}
- </td>
- </tr>
- {/foreach}
-
- {foreach from=$activity.customGroups key=customGroupName item=customGroup}
- <tr>
- <th {$headerStyle}>
- {$customGroupName}
- </th>
- </tr>
- {foreach from=$customGroup item=field}
- <tr>
- <td {$labelStyle}>
- {$field.label}
- </td>
- <td {$valueStyle}>
- {if $field.type eq 'Date'}
- {$field.value|crmDate:$config->dateformatDatetime}
- {else}
- {$field.value}
- {/if}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- </table>
- </td>
- </tr>
- </table>
-</center>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-===========================================================
-{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 activity{/ts} : {$editActURL}
-{/if}
-{if $viewActURL}
-{ts}View 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
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- <p>{ts 1=$displayName}Dear %1{/ts},</p>
-
- {if $recur_txnType eq 'START'}
-
- <p>{ts}Thanks for your recurring contribution sign-up.{/ts}</p>
- <p>{ts 1=$recur_frequency_interval 2=$recur_frequency_unit 3=$recur_installments}This recurring contribution will be automatically processed every %1 %2(s) for a total %3 installment(s).{/ts}</p>
- <p>{ts}Start Date{/ts}: {$recur_start_date|crmDate}</p>
- <p>{ts 1=$receipt_from_name 2=$receipt_from_email}You have pledged to make this recurring donation. You will be charged periodically (per frequency listed above), and you will receive an email receipt from %1 following each charge. These recurring donations will continue until you explicitly cancel the donation. You may change or cancel your recurring donation at anytime by logging into your account. If you have questions about recurring donations please contact us at %2.{/ts}</p>
-
- {elseif $recur_txnType eq 'END'}
-
- <p>{ts}Your recurring contribution term has ended.{/ts}</p>
- <p>{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you for your support.{/ts}</p>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$recur_start_date|crmDate}
- </td>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$recur_end_date|crmDate}
- </td>
- </tr>
- </table>
-
- {/if}
-
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{ts 1=$displayName}Dear %1{/ts},
-
-{if $recur_txnType eq 'START'}
-
-{ts}Thanks for your recurring contribution sign-up.{/ts}
-
-
-{ts 1=$recur_frequency_interval 2=$recur_frequency_unit 3=$recur_installments}This recurring contribution will be automatically processed every %1 %2(s) for a total %3 installment(s).{/ts}
-
-
-{ts}Start Date{/ts}: {$recur_start_date|crmDate}
-
-
-{ts 1=$receipt_from_name 2=$receipt_from_email}You have pledged to make this recurring donation. You will be charged periodically (per frequency listed above), and you will receive an email receipt from %1 following each charge. These recurring donations will continue until you explicitly cancel the donation. You may change or cancel your recurring donation at anytime by logging into your account. If you have questions about recurring donations please contact us at %2.{/ts}
-
-{elseif $recur_txnType eq 'END'}
-
-{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}
-
-
-==================================================
-{ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}
-
-==================================================
-{ts}Start Date{/ts}: {$recur_start_date|crmDate}
-
-{ts}End Date{/ts}: {$recur_end_date|crmDate}
-
-{/if}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-
- {if $membership_assign}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership Type{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_name}
- </td>
- </tr>
- {if $mem_start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $mem_end_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_end_date|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
-
- {if $membership_amount}
-
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
- {if $amount}
- {if ! $is_separate_payment }
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {else}
- <tr>
- <td {$labelStyle}>
- {ts}Additional Contribution{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Total{/ts}
- </td>
- <td {$valueStyle}>
- {$amount+$membership_amount|crmMoney}
- </td>
- </tr>
-
- {elseif $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
-
- {else}
-
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {elseif $membership_amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $membership_trx_id}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_trx_id}
- </td>
- </tr>
- {/if}
- {if $is_recur}
- {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfName}
- <tr>
- <th {$headerStyle}>
- {ts}On Behalf Of{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$onBehalfName}<br />
- {$onBehalfAddress|nl2br}<br />
- {$onBehalfEmail}
- </td>
- </tr>
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0 OR $membership_amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $receipt_text}
-{$receipt_text}
-{/if}
-{if $is_pay_later}
-
-===========================================================
-{$pay_later_receipt}
-===========================================================
-{else}
-
-{ts}Please print this receipt for your records.{/ts}
-{/if}
-
-{if $membership_assign}
-===========================================================
-{ts}Membership Information{/ts}
-
-===========================================================
-{ts}Membership Type{/ts}: {$membership_name}
-{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate}
-{/if}
-{if $mem_end_date}{ts}Membership End Date{/ts}: {$mem_end_date|crmDate}
-{/if}
-
-{/if}
-{if $amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{if $membership_amount }
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{if $amount}
-{if ! $is_separate_payment }
-{ts}Contribution Amount{/ts}: {$amount|crmMoney}
-{else}
-{ts}Additional Contribution{/ts}: {$amount|crmMoney}
-{/if}
-{/if}
--------------------------------------------
-{ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
-{elseif $lineItem and $priceSetID}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
-{/foreach}
-{/foreach}
-
-{ts}Total Amount{/ts}: {$amount|crmMoney}
-{else}
-{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
-{/if}
-{elseif $membership_amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{/if}
-{if $receive_date}
-
-{ts}Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $is_monetary and $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-
-{/if}
-{if $membership_trx_id}
-{ts}Membership Transaction #{/ts}: {$membership_trx_id}
-
-{/if}
-{if $is_recur}
-{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
-{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by visiting this web page: %1.{/ts}
-{/if}
-{/if}
-
-{if $honor_block_is_active }
-===========================================================
-{$honor_type}
-===========================================================
-{$honor_prefix} {$honor_first_name} {$honor_last_name}
-{if $honor_email}
-{ts}Honoree Email{/ts}: {$honor_email}
-{/if}
-
-{/if}
-{if $pcpBlock}
-===========================================================
-{ts}Personal Campaign Page{/ts}
-
-===========================================================
-{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
-
-{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
-
-{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
-
-{/if}
-{if $onBehalfName}
-===========================================================
-{ts}On Behalf Of{/ts}
-
-===========================================================
-{$onBehalfName}
-{$onBehalfAddress}
-
-{$onBehalfEmail}
-
-{/if}
-
-{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
-{if $is_pay_later}
-===========================================================
-{ts}Registered Email{/ts}
-
-===========================================================
-{$email}
-{elseif $amount GT 0 OR $membership_amount GT 0 }
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-{$email}
-{/if} {* End ! is_pay_later condition. *}
-{/if}
-{if $contributeMode eq 'direct' AND !$is_pay_later AND ( $amount GT 0 OR $membership_amount GT 0 ) }
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-
-{if $selectPremium }
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$product_name}
-{if $option}
-{ts}Option{/ts}: {$option}
-{/if}
-{if $sku}
-{ts}SKU{/ts}: {$sku}
-{/if}
-{if $start_date}
-{ts}Start Date{/ts}: {$start_date|crmDate}
-{/if}
-{if $end_date}
-{ts}End Date{/ts}: {$end_date|crmDate}
-{/if}
-{if $contact_email OR $contact_phone}
-
-{ts}For information about this premium, contact:{/ts}
-
-{if $contact_email}
- {$contact_email}
-{/if}
-{if $contact_phone}
- {$contact_phone}
-{/if}
-{/if}
-{if $is_deductible AND $price}
-
-{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
-{/if}
-
-{if $customPre}
-===========================================================
-{$customPre_grouptitle}
-
-===========================================================
-{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
-
-
-{if $customPost}
-===========================================================
-{$customPost_grouptitle}
-
-===========================================================
-{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.3.3.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- <p>{ts 1=$displayName}Dear %1{/ts},</p>
-
- {if $recur_txnType eq 'START'}
- {if $auto_renew_membership}
- <p>{ts}Thanks for your auto renew membership sign-up.{/ts}</p>
- <p>{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed
- every %1 %2(s). {/ts}</p>
- {else}
-
- <p>{ts}Thanks for your recurring contribution sign-up.{/ts}</p>
- <p>{ts 1=$recur_frequency_interval 2=$recur_frequency_unit 3=$recur_installments}This recurring contribution will be
- automatically processed every %1 %2(s) for a total of %3 installment(s).{/ts}</p>
- <p>{ts}Start Date{/ts}: {$recur_start_date|crmDate}</p>
- {/if}
- <p>{ts 1=$receipt_from_name 2=$receipt_from_email}You have pledged to make this recurring donation. You will be charged periodically (per frequency listed above), and you will receive an email receipt from %1 following each charge. These recurring donations will continue until you explicitly cancel the donation. You may change or cancel your recurring donation at anytime by logging into your account. If you have questions about recurring donations please contact us at %2.{/ts}</p>
-
- {elseif $recur_txnType eq 'END'}
-
- {if $auto_renew_membership}
- <p>{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}</p>
- {else}
- <p>{ts}Your recurring contribution term has ended.{/ts}</p>
- <p>{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you for your support.{/ts}</p>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$recur_start_date|crmDate}
- </td>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$recur_end_date|crmDate}
- </td>
- </tr>
- </table>
-
- {/if}
- {/if}
-
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{ts 1=$displayName}Dear %1{/ts},
-
-{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 every %1 %2(s).{/ts}
-
-{else}
-
-{ts}Thanks for your recurring contribution sign-up.{/ts}
-
-
-{ts 1=$recur_frequency_interval 2=$recur_frequency_unit 3=$recur_installments}This recurring contribution will be automatically processed every %1 %2(s) for a total of %3 installment(s).{/ts}
-
-
-{ts}Start Date{/ts}: {$recur_start_date|crmDate}
-{/if}
-
-{ts 1=$receipt_from_name 2=$receipt_from_email}You have pledged to make this recurring donation. You will be charged periodically (per frequency listed above), and you will receive an email receipt from %1 following each charge. These recurring donations will continue until you explicitly cancel the donation. You may change or cancel your recurring donation at anytime by logging into your account. If you have questions about recurring donations please contact us at %2.{/ts}
-
-{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}
-
-
-{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}
-
-
-==================================================
-{ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}
-
-==================================================
-{ts}Start Date{/ts}: {$recur_start_date|crmDate}
-
-{ts}End Date{/ts}: {$recur_end_date|crmDate}
-
-{/if}
-{/if}
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.3.beta1.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<p>Thank you for signing {$petition.title}.</p>
-
-<p>In order to <b>complete your signature</b>, we must confirm your e-mail.
-<br />
-Please do so by visiting the following web page by clicking
-on the link below or pasting the link into your browser.
-<br /><br />
-Email confirmation page: <a href="{$petition.confirmUrl} ">{$petition.confirmUrl}</a></p>
-
-<p>If you did not sign this petition, please ignore this message.</p>
+++ /dev/null
-Confirmation of signature needed for {$petition.title}
+++ /dev/null
-Thank you for signing {$petition.title}.
-
-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}
-
-If you did not sign this petition, please ignore this message.
+++ /dev/null
-<p>Thank you for signing {$petition.title}.</p>
-
-{include file="CRM/Campaign/Page/Petition/SocialNetwork.tpl" petition_id=$survey_id noscript=true email=true}
+++ /dev/null
-Thank you for signing {$petition.title}
\ No newline at end of file
+++ /dev/null
-Thank you for signing {$petition.title}.
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.3.beta2.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $formValues.receipt_text}
- <p>{$formValues.receipt_text|htmlize}</p>
- {else}
- <p>{ts}Thank you for your support.{/ts}</p>
- {/if}
-
- <p>{ts}Please print this receipt for your records.{/ts}</p>
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Contribution Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.contributionType_name}
- </td>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney:$currency}
- </td>
- <td>
- {$line.line_total|crmMoney:$currency}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- {/if}
-
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.total_amount|crmMoney:$currency}
- </td>
- </tr>
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Received Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receipt_date}
- <tr>
- <td {$labelStyle}>
- {ts}Receipt Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receipt_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $formValues.paidBy and !$formValues.hidden_CreditCard}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.paidBy}
- </td>
- </tr>
- {if $formValues.check_number}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.check_number}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $formValues.trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction ID{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $ccContribution}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- {if $formValues.honor_first_name}
- <tr>
- <th {$headerStyle}>
- {$formValues.honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$formValues.honor_prefix} {$formValues.honor_first_name} {$formValues.honor_last_name}<br />
- {if $formValues.honor_email}
- {ts}Honoree Email{/ts}: {$formValues.honor_email}
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $formValues.product_name}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$formValues.product_name}
- </td>
- </tr>
- {if $formValues.product_option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.product_option}
- </td>
- </tr>
- {/if}
- {if $formValues.product_sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.product_sku}
- </td>
- </tr>
- {/if}
- {if $fulfilled_date}
- <tr>
- <td {$labelStyle}>
- {ts}Sent{/ts}
- </td>
- <td {$valueStyle}>
- {$fulfilled_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $formValues.receipt_text}
-{$formValues.receipt_text}
-{else}{ts}Thank you for your support.{/ts}{/if}
-
-{ts}Please print this receipt for your records.{/ts}
-
-
-===========================================================
-{ts}Contribution Information{/ts}
-
-===========================================================
-{ts}Contribution Type{/ts}: {$formValues.contributionType_name}
-{if $lineItem}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {$line.line_total|crmMoney:$currency|string_format:"%10s"}
-{/foreach}
-{/foreach}
-{/if}
-
-{ts}Total Amount{/ts}: {$formValues.total_amount|crmMoney:$currency}
-{if $receive_date}
-{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
-{/if}
-{if $receipt_date}
-{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
-{/if}
-{if $formValues.paidBy and !$formValues.hidden_CreditCard}
-{ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
-{ts}Check Number{/ts}: {$formValues.check_number}
-{/if}
-{/if}
-{if $formValues.trxn_id}
-{ts}Transaction ID{/ts}: {$formValues.trxn_id}
-{/if}
-
-{if $ccContribution}
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-===========================================================
-{$customName}
-===========================================================
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
-{if $formValues.honor_first_name}
-
-===========================================================
-{$formValues.honor_type}
-===========================================================
-{$formValues.honor_prefix} {$formValues.honor_first_name} {$formValues.honor_last_name}
-{if $formValues.honor_email}
-{ts}Honoree Email{/ts}: {$formValues.honor_email}
-{/if}
-{/if}
-
-{if $formValues.product_name}
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$formValues.product_name}
-{if $formValues.product_option}
-{ts}Option{/ts}: {$formValues.product_option}
-{/if}
-{if $formValues.product_sku}
-{ts}SKU{/ts}: {$formValues.product_sku}
-{/if}
-{if $fulfilled_date}
-{ts}Sent{/ts}: {$fulfilled_date|crmDate}
-{/if}
-{/if}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Contribution Information{/ts}
- </th>
- </tr>
-
- {if $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney:$currency}
- </td>
- <td>
- {$line.line_total|crmMoney:$currency}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency}
- </td>
- </tr>
-
- {else}
-
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $is_recur}
- {if $contributeMode eq 'notify'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can modify or cancel future contributions by <a href="%1">logging in to your account</a>.{/ts}
- </td>
- </tr>
- {elseif $contributeMode eq 'directIPN' and $receiptFromEmail}
- <tr>
- <td {$labelStyle}>
- {ts 1=$receiptFromEmail}This is a recurring contribution. To modify or cancel future contributions please contact us at %1.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfName}
- <tr>
- <th {$headerStyle}>
- {ts}On Behalf Of{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$onBehalfName}<br />
- {$onBehalfAddress|nl2br}<br />
- {$onBehalfEmail}
- </td>
- </tr>
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $receipt_text}
-{$receipt_text}
-{/if}
-{if $is_pay_later}
-
-===========================================================
-{$pay_later_receipt}
-===========================================================
-{else}
-
-{ts}Please print this receipt for your records.{/ts}
-{/if}
-
-{if $amount}
-===========================================================
-{ts}Contribution Information{/ts}
-
-===========================================================
-{if $lineItem and $priceSetID}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {$line.line_total|crmMoney:$currency|string_format:"%10s"}
-{/foreach}
-{/foreach}
-
-{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
-{else}
-{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if $amount_level } - {$amount_level} {/if}
-{/if}
-{/if}
-{if $receive_date}
-
-{ts}Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $is_monetary and $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-
-{if $is_recur}
-{if $contributeMode eq 'notify'}
-{ts}This is a recurring contribution. You can modify or cancel future contributions by logging in to your account at:{/ts}
-
-{$cancelSubscriptionUrl}
-{elseif $contributeMode eq 'directIPN' and $receiptFromEmail}
-{ts 1=$receiptFromEmail}This is a recurring contribution. To modify or cancel future contributions please contact us at %1.{/ts}
-
-{/if}
-{/if}
-
-{if $honor_block_is_active }
-===========================================================
-{$honor_type}
-===========================================================
-{$honor_prefix} {$honor_first_name} {$honor_last_name}
-{if $honor_email}
-{ts}Honoree Email{/ts}: {$honor_email}
-{/if}
-
-{/if}
-{if $pcpBlock}
-===========================================================
-{ts}Personal Campaign Page{/ts}
-
-===========================================================
-{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
-
-{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
-
-{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
-
-{/if}
-{if $onBehalfName}
-===========================================================
-{ts}On Behalf Of{/ts}
-
-===========================================================
-{$onBehalfName}
-{$onBehalfAddress}
-
-{$onBehalfEmail}
-
-{/if}
-
-{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
-{if $is_pay_later}
-===========================================================
-{ts}Registered Email{/ts}
-
-===========================================================
-{$email}
-{elseif $amount GT 0}
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-{$email}
-{/if} {* End ! is_pay_later condition. *}
-{/if}
-{if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-
-{if $selectPremium }
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$product_name}
-{if $option}
-{ts}Option{/ts}: {$option}
-{/if}
-{if $sku}
-{ts}SKU{/ts}: {$sku}
-{/if}
-{if $start_date}
-{ts}Start Date{/ts}: {$start_date|crmDate}
-{/if}
-{if $end_date}
-{ts}End Date{/ts}: {$end_date|crmDate}
-{/if}
-{if $contact_email OR $contact_phone}
-
-{ts}For information about this premium, contact:{/ts}
-
-{if $contact_email}
- {$contact_email}
-{/if}
-{if $contact_phone}
- {$contact_phone}
-{/if}
-{/if}
-{if $is_deductible AND $price}
-
-{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
-{/if}
-
-{if $customPre}
-===========================================================
-{$customPre_grouptitle}
-
-===========================================================
-{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
-
-
-{if $customPost}
-===========================================================
-{$customPost_grouptitle}
-
-===========================================================
-{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
- <p>{$event.confirm_email_text|htmlize}</p>
- {/if}
-
- {if $isOnWaitlist}
- <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
- <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
- {/if}
- {elseif $isRequireApproval}
- <p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
- <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
- {/if}
- {elseif $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Event Information and Location{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$event.event_title}<br />
- {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
- </td>
- </tr>
-
- {if $event.participant_role neq 'Attendee' and $defaultRole}
- <tr>
- <td {$labelStyle}>
- {ts}Participant Role{/ts}
- </td>
- <td {$valueStyle}>
- {$event.participant_role}
- </td>
- </tr>
- {/if}
-
- {if $isShowLocation}
- <tr>
- <td colspan="2" {$valueStyle}>
- {if $location.address.1.name}
- {$location.address.1.name}<br />
- {/if}
- {if $location.address.1.street_address}
- {$location.address.1.street_address}<br />
- {/if}
- {if $location.address.1.supplemental_address_1}
- {$location.address.1.supplemental_address_1}<br />
- {/if}
- {if $location.address.1.supplemental_address_2}
- {$location.address.1.supplemental_address_2}<br />
- {/if}
- {if $location.address.1.city}
- {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $location.phone.1.phone || $location.email.1.email}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts}Event Contacts:{/ts}
- </td>
- </tr>
- {foreach from=$location.phone item=phone}
- {if $phone.phone}
- <tr>
- <td {$labelStyle}>
- {if $phone.phone_type}
- {$phone.phone_type_display}
- {else}
- {ts}Phone{/ts}
- {/if}
- </td>
- <td {$valueStyle}>
- {$phone.phone}
- </td>
- </tr>
- {/if}
- {/foreach}
- {foreach from=$location.email item=eventEmail}
- {if $eventEmail.email}
- <tr>
- <td {$labelStyle}>
- {ts}Email{/ts}
- </td>
- <td {$valueStyle}>
- {$eventEmail.email}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
- <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
- </td>
- </tr>
- {if $email}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {/if}
-
-
- {if $event.is_monetary}
-
- <tr>
- <th {$headerStyle}>
- {$event.fee_label}
- </th>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- {if $value neq 'skip'}
- {if $isPrimary}
- {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts 1=$priceset+1}Participant %1{/ts}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- {if $pricesetFieldsCount }
- <td>
- {$line.participant_count}
- </td>
- {/if}
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $amount && !$lineItem}
- {foreach from=$amount item=amnt key=level}
- <tr>
- <td colspan="2" {$valueStyle}>
- {$amnt.amount|crmMoney} {$amnt.label}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if $isPrimary}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
- </td>
- </tr>
- {if $pricesetFieldsCount }
- <tr>
- <td {$labelStyle}>
- {ts}Total Participants{/ts}</td>
- <td {$valueStyle}>
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
- {$count}
- </td>
- </tr>
- {/if}
- {if $is_pay_later}
- <tr>
- <td colspan="2" {$labelStyle}>
- {$pay_later_receipt}
- </td>
- </tr>
- {/if}
-
- {if $register_date}
- <tr>
- <td {$labelStyle}>
- {ts}Registration Date{/ts}
- </td>
- <td {$valueStyle}>
- {$register_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $contributionTypeName}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$contributionTypeName}
- </td>
- </tr>
- {/if}
-
- {if $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$paidBy}
- </td>
- </tr>
- {/if}
-
- {if $checkNumber}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$checkNumber}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {/if}
-
- {/if} {* End of conditional section for Paid events *}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customProfile}
- {foreach from=$customProfile item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {ts 1=$customName+1}Participant Information - Participant %1{/ts}
- </th>
- </tr>
- {foreach from=$value item=val key=field}
- {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
- <tr>
- <td colspan="2" {$labelStyle}>
- {if $field eq 'additionalCustomPre'}
- {$additionalCustomPre_grouptitle}
- {else}
- {$additionalCustomPost_grouptitle}
- {/if}
- </td>
- </tr>
- {foreach from=$val item=v key=f}
- <tr>
- <td {$labelStyle}>
- {$f}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/if}
- {/foreach}
- {/foreach}
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
-{$event.confirm_email_text}
-{/if}
-
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}You have been added to the WAIT LIST for this event.{/ts}
-
-{if $isPrimary}
-{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
-
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Your registration has been submitted.{/ts}
-
-{if $isPrimary}
-{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
-
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $is_pay_later}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{else}
-
-{ts}Please print this confirmation for your records.{/ts}
-{/if}
-
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Event Information and Location{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.event_title}
-{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
-
-{if $event.participant_role neq 'Attendee' and $defaultRole}
-{ts}Participant Role{/ts}: {$event.participant_role}
-{/if}
-
-{if $isShowLocation}
-{if $location.address.1.name}
-
-{$location.address.1.name}
-{/if}
-{if $location.address.1.street_address}{$location.address.1.street_address}
-{/if}
-{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
-{/if}
-{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
-{/if}
-{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
-{/if}
-
-{/if}{*End of isShowLocation condition*}
-
-{if $location.phone.1.phone || $location.email.1.email}
-
-{ts}Event Contacts:{/ts}
-{foreach from=$location.phone item=phone}
-{if $phone.phone}
-
-{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
-{/foreach}
-{foreach from=$location.email item=eventEmail}
-{if $eventEmail.email}
-
-{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
-{/if}
-
-{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
-{ts}Download iCalendar File:{/ts} {$icalFeed}
-{if $email}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Registered Email{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$email}
-{/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
-
-{if $value neq 'skip'}
-{if $isPrimary}
-{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
-{ts 1=$priceset+1}Participant %1{/ts}
-{/if}
-{/if}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{capture assign=ts_participant_total}{if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"} {$ts_participant_count|string_format:"%10s"}
-{/foreach}
-{/if}
-{/foreach}
-{/if}
-{if $amount && !$lineItem}
-{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
-{/foreach}
-{/if}
-{if $isPrimary }
-
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
-
-{if $pricesetFieldsCount }
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- {assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
-
-{ts}Total Participants{/ts}: {$count}
-{/if}
-
-{if $is_pay_later }
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{/if}
-
-{if $register_date}
-{ts}Registration Date{/ts}: {$register_date|crmDate}
-{/if}
-{if $receive_date}
-{ts}Transaction Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $contributionTypeName}
-{ts}Contribution Type{/ts}: {$contributionTypeName}
-{/if}
-{if $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-{if $paidBy}
-{ts}Paid By{/ts}: {$paidBy}
-{/if}
-{if $checkNumber}
-{ts}Check Number{/ts}: {$checkNumber}
-{/if}
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Billing Name and Address{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-===========================================================
-{ts}Credit Card Information{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-{/if} {* End of conditional section for Paid events *}
-
-{if $customPre}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPre_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPre item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-
-{if $customPost}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPost_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPost item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-{if $customProfile}
-
-{foreach from=$customProfile item=value key=customName}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts 1=$customName+1}Participant Information - Participant %1{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$value item=val key=field}
-{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
-{if $field eq 'additionalCustomPre' }
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{$additionalCustomPre_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{else}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{$additionalCustomPost_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{/if}
-{foreach from=$val item=v key=f}
-{$f}: {$v}
-{/foreach}
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
-
-
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
- <p>{$event.confirm_email_text|htmlize}</p>
- {/if}
-
- {if $isOnWaitlist}
- <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
- <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
- {/if}
- {elseif $isRequireApproval}
- <p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
- <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
- {/if}
- {elseif $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Event Information and Location{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$event.event_title}<br />
- {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
- </td>
- </tr>
-
- {if $event.participant_role neq 'Attendee' and $defaultRole}
- <tr>
- <td {$labelStyle}>
- {ts}Participant Role{/ts}
- </td>
- <td {$valueStyle}>
- {$event.participant_role}
- </td>
- </tr>
- {/if}
-
- {if $isShowLocation}
- <tr>
- <td colspan="2" {$valueStyle}>
- {if $location.address.1.name}
- {$location.address.1.name}<br />
- {/if}
- {if $location.address.1.street_address}
- {$location.address.1.street_address}<br />
- {/if}
- {if $location.address.1.supplemental_address_1}
- {$location.address.1.supplemental_address_1}<br />
- {/if}
- {if $location.address.1.supplemental_address_2}
- {$location.address.1.supplemental_address_2}<br />
- {/if}
- {if $location.address.1.city}
- {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $location.phone.1.phone || $location.email.1.email}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts}Event Contacts:{/ts}
- </td>
- </tr>
- {foreach from=$location.phone item=phone}
- {if $phone.phone}
- <tr>
- <td {$labelStyle}>
- {if $phone.phone_type}
- {$phone.phone_type_display}
- {else}
- {ts}Phone{/ts}
- {/if}
- </td>
- <td {$valueStyle}>
- {$phone.phone}
- </td>
- </tr>
- {/if}
- {/foreach}
- {foreach from=$location.email item=eventEmail}
- {if $eventEmail.email}
- <tr>
- <td {$labelStyle}>
- {ts}Email{/ts}
- </td>
- <td {$valueStyle}>
- {$eventEmail.email}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
- <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
- </td>
- </tr>
- {if $email}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {/if}
-
-
- {if $event.is_monetary}
-
- <tr>
- <th {$headerStyle}>
- {$event.fee_label}
- </th>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- {if $value neq 'skip'}
- {if $isPrimary}
- {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- {if $pricesetFieldsCount }<td>{$line.participant_count}</td> {/if}
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $amount && !$lineItem}
- {foreach from=$amount item=amnt key=level}
- <tr>
- <td colspan="2" {$valueStyle}>
- {$amnt.amount|crmMoney} {$amnt.label}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if $isPrimary}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
- </td>
- </tr>
- {if $pricesetFieldsCount }
- <tr>
- <td {$labelStyle}>
- {ts}Total Participants{/ts}</td>
- <td {$valueStyle}>
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- {assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
- {$count}
- </td> </tr>
- {/if}
- {if $is_pay_later}
- <tr>
- <td colspan="2" {$labelStyle}>
- {$pay_later_receipt}
- </td>
- </tr>
- {/if}
-
- {if $register_date}
- <tr>
- <td {$labelStyle}>
- {ts}Registration Date{/ts}
- </td>
- <td {$valueStyle}>
- {$register_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $contributionTypeName}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$contributionTypeName}
- </td>
- </tr>
- {/if}
-
- {if $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$paidBy}
- </td>
- </tr>
- {/if}
-
- {if $checkNumber}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$checkNumber}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {/if}
-
- {/if} {* End of conditional section for Paid events *}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customProfile}
- {foreach from=$customProfile item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {ts 1=$customName+1}Participant Information - Participant %1{/ts}
- </th>
- </tr>
- {foreach from=$value item=val key=field}
- {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
- <tr>
- <td colspan="2" {$labelStyle}>
- {if $field eq 'additionalCustomPre'}
- {$additionalCustomPre_grouptitle}
- {else}
- {$additionalCustomPost_grouptitle}
- {/if}
- </td>
- </tr>
- {foreach from=$val item=v key=f}
- <tr>
- <td {$labelStyle}>
- {$f}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/if}
- {/foreach}
- {/foreach}
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
-{$event.confirm_email_text}
-{/if}
-
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}You have been added to the WAIT LIST for this event.{/ts}
-
-{if $isPrimary}
-{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Your registration has been submitted.{/ts}
-
-{if $isPrimary}
-{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
-
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $is_pay_later}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{else}
-
-{ts}Please print this confirmation for your records.{/ts}
-{/if}
-
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Event Information and Location{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.event_title}
-{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
-
-{if $event.participant_role neq 'Attendee' and $defaultRole}
-{ts}Participant Role{/ts}: {$event.participant_role}
-{/if}
-
-{if $isShowLocation}
-{if $location.address.1.name}
-
-{$location.address.1.name}
-{/if}
-{if $location.address.1.street_address}{$location.address.1.street_address}
-{/if}
-{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
-{/if}
-{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
-{/if}
-{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
-{/if}
-
-{/if}{*End of isShowLocation condition*}
-
-{if $location.phone.1.phone || $location.email.1.email}
-
-{ts}Event Contacts:{/ts}
-{foreach from=$location.phone item=phone}
-{if $phone.phone}
-
-{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
-{/foreach}
-{foreach from=$location.email item=eventEmail}
-{if $eventEmail.email}
-
-{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
-{/if}
-
-{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
-{ts}Download iCalendar File:{/ts} {$icalFeed}
-{if $email}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Registered Email{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$email}
-{/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
-
-{if $value neq 'skip'}
-{if $isPrimary}
-{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
-{ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
-
-{/if}
-{/if}
------------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
------------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
-{/foreach}
-{/if}
-{/foreach}
-{/if}
-{if $amount && !$lineItem}
-{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
-{/foreach}
-{/if}
-{if $isPrimary }
-
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
-
-{if $pricesetFieldsCount }
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- {assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
-
-{ts}Total Participants{/ts}: {$count}
-{/if}
-
-{if $is_pay_later }
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{/if}
-
-{if $register_date}
-{ts}Registration Date{/ts}: {$register_date|crmDate}
-{/if}
-{if $receive_date}
-{ts}Transaction Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $contributionTypeName}
-{ts}Contribution Type{/ts}: {$contributionTypeName}
-{/if}
-{if $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-{if $paidBy}
-{ts}Paid By{/ts}: {$paidBy}
-{/if}
-{if $checkNumber}
-{ts}Check Number{/ts}: {$checkNumber}
-{/if}
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Billing Name and Address{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Credit Card Information{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-{/if} {* End of conditional section for Paid events *}
-
-{if $customPre}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPre_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPre item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-
-{if $customPost}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPost_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPost item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-{if $customProfile}
-
-{foreach from=$customProfile item=value key=customName}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts 1=$customName+1}Participant Information - Participant %1{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$value item=val key=field}
-{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
-{if $field eq 'additionalCustomPre' }
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{$additionalCustomPre_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{else}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{$additionalCustomPost_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{/if}
-{foreach from=$val item=v key=f}
-{$f}: {$v}
-{/foreach}
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
+++ /dev/null
-Thank you for signing {$petition.title}.
-
-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}
-
-If you did not sign this petition, please ignore this message.
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.4.3.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Contribution Information{/ts}
- </th>
- </tr>
-
- {if $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney:$currency}
- </td>
- <td>
- {$line.line_total|crmMoney:$currency}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency}
- </td>
- </tr>
-
- {else}
-
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $is_recur}
- {if $contributeMode eq 'notify'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can modify or cancel future contributions by <a href="%1">logging in to your account</a>.{/ts}
- </td>
- </tr>
- {elseif $contributeMode eq 'directIPN' and $receiptFromEmail}
- <tr>
- <td {$labelStyle}>
- {ts 1=$receiptFromEmail}This is a recurring contribution. To modify or cancel future contributions please contact us at %1.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfProfile}
- <tr>
- <th {$headerStyle}>
- {$onBehalfProfile_grouptitle}
- </th>
- </tr>
- {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
- <tr>
- <td {$labelStyle}>
- {$onBehalfName}
- </td>
- <td {$valueStyle}>
- {$onBehalfValue}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $receipt_text}
-{$receipt_text}
-{/if}
-{if $is_pay_later}
-
-===========================================================
-{$pay_later_receipt}
-===========================================================
-{else}
-
-{ts}Please print this receipt for your records.{/ts}
-{/if}
-
-{if $amount}
-===========================================================
-{ts}Contribution Information{/ts}
-
-===========================================================
-{if $lineItem and $priceSetID}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {$line.line_total|crmMoney:$currency|string_format:"%10s"}
-{/foreach}
-{/foreach}
-
-{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
-{else}
-{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if $amount_level } - {$amount_level} {/if}
-{/if}
-{/if}
-{if $receive_date}
-
-{ts}Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $is_monetary and $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-
-{if $is_recur}
-{if $contributeMode eq 'notify'}
-{ts}This is a recurring contribution. You can modify or cancel future contributions by logging in to your account at:{/ts}
-
-{$cancelSubscriptionUrl}
-{elseif $contributeMode eq 'directIPN' and $receiptFromEmail}
-{ts 1=$receiptFromEmail}This is a recurring contribution. To modify or cancel future contributions please contact us at %1.{/ts}
-
-{/if}
-{/if}
-
-{if $honor_block_is_active }
-===========================================================
-{$honor_type}
-===========================================================
-{$honor_prefix} {$honor_first_name} {$honor_last_name}
-{if $honor_email}
-{ts}Honoree Email{/ts}: {$honor_email}
-{/if}
-
-{/if}
-{if $pcpBlock}
-===========================================================
-{ts}Personal Campaign Page{/ts}
-
-===========================================================
-{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
-
-{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
-
-{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
-
-{/if}
-{if $onBehalfProfile}
-===========================================================
-{ts}On Behalf Of{/ts}
-
-===========================================================
-{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
-{$onBehalfName}: {$onBehalfValue}
-{/foreach}
-{/if}
-
-{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
-{if $is_pay_later}
-===========================================================
-{ts}Registered Email{/ts}
-
-===========================================================
-{$email}
-{elseif $amount GT 0}
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-{$email}
-{/if} {* End ! is_pay_later condition. *}
-{/if}
-{if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-
-{if $selectPremium }
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$product_name}
-{if $option}
-{ts}Option{/ts}: {$option}
-{/if}
-{if $sku}
-{ts}SKU{/ts}: {$sku}
-{/if}
-{if $start_date}
-{ts}Start Date{/ts}: {$start_date|crmDate}
-{/if}
-{if $end_date}
-{ts}End Date{/ts}: {$end_date|crmDate}
-{/if}
-{if $contact_email OR $contact_phone}
-
-{ts}For information about this premium, contact:{/ts}
-
-{if $contact_email}
- {$contact_email}
-{/if}
-{if $contact_phone}
- {$contact_phone}
-{/if}
-{/if}
-{if $is_deductible AND $price}
-
-{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
-{/if}
-
-{if $customPre}
-===========================================================
-{$customPre_grouptitle}
-
-===========================================================
-{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
-
-
-{if $customPost}
-===========================================================
-{$customPost_grouptitle}
-
-===========================================================
-{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-
- {if $membership_assign}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership Type{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_name}
- </td>
- </tr>
- {if $mem_start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $mem_end_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_end_date|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
-
- {if $membership_amount}
-
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
- {if $amount}
- {if ! $is_separate_payment }
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {else}
- <tr>
- <td {$labelStyle}>
- {ts}Additional Contribution{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Total{/ts}
- </td>
- <td {$valueStyle}>
- {$amount+$membership_amount|crmMoney}
- </td>
- </tr>
-
- {elseif $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
-
- {else}
-
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {elseif $membership_amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $membership_trx_id}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_trx_id}
- </td>
- </tr>
- {/if}
- {if $is_recur}
- {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfProfile}
- <tr>
- <th {$headerStyle}>
- {$onBehalfProfile_grouptitle}
- </th>
- </tr>
- {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
- <tr>
- <td {$labelStyle}>
- {$onBehalfName}
- </td>
- <td {$valueStyle}>
- {$onBehalfValue}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0 OR $membership_amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $receipt_text}
-{$receipt_text}
-{/if}
-{if $is_pay_later}
-
-===========================================================
-{$pay_later_receipt}
-===========================================================
-{else}
-
-{ts}Please print this receipt for your records.{/ts}
-{/if}
-
-{if $membership_assign}
-===========================================================
-{ts}Membership Information{/ts}
-
-===========================================================
-{ts}Membership Type{/ts}: {$membership_name}
-{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate}
-{/if}
-{if $mem_end_date}{ts}Membership End Date{/ts}: {$mem_end_date|crmDate}
-{/if}
-
-{/if}
-{if $amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{if $membership_amount }
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{if $amount}
-{if ! $is_separate_payment }
-{ts}Contribution Amount{/ts}: {$amount|crmMoney}
-{else}
-{ts}Additional Contribution{/ts}: {$amount|crmMoney}
-{/if}
-{/if}
--------------------------------------------
-{ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
-{elseif $lineItem and $priceSetID}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
-{/foreach}
-{/foreach}
-
-{ts}Total Amount{/ts}: {$amount|crmMoney}
-{else}
-{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
-{/if}
-{elseif $membership_amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{/if}
-{if $receive_date}
-
-{ts}Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $is_monetary and $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-
-{/if}
-{if $membership_trx_id}
-{ts}Membership Transaction #{/ts}: {$membership_trx_id}
-
-{/if}
-{if $is_recur}
-{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
-{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by visiting this web page: %1.{/ts}
-{/if}
-{/if}
-
-{if $honor_block_is_active }
-===========================================================
-{$honor_type}
-===========================================================
-{$honor_prefix} {$honor_first_name} {$honor_last_name}
-{if $honor_email}
-{ts}Honoree Email{/ts}: {$honor_email}
-{/if}
-
-{/if}
-{if $pcpBlock}
-===========================================================
-{ts}Personal Campaign Page{/ts}
-
-===========================================================
-{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
-
-{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
-
-{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
-
-{/if}
-{if $onBehalfProfile}
-===========================================================
-{ts}On Behalf Of{/ts}
-
-===========================================================
-{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
-{$onBehalfName}: {$onBehalfValue}
-{/foreach}
-{/if}
-
-{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
-{if $is_pay_later}
-===========================================================
-{ts}Registered Email{/ts}
-
-===========================================================
-{$email}
-{elseif $amount GT 0 OR $membership_amount GT 0 }
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-{$email}
-{/if} {* End ! is_pay_later condition. *}
-{/if}
-{if $contributeMode eq 'direct' AND !$is_pay_later AND ( $amount GT 0 OR $membership_amount GT 0 ) }
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-
-{if $selectPremium }
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$product_name}
-{if $option}
-{ts}Option{/ts}: {$option}
-{/if}
-{if $sku}
-{ts}SKU{/ts}: {$sku}
-{/if}
-{if $start_date}
-{ts}Start Date{/ts}: {$start_date|crmDate}
-{/if}
-{if $end_date}
-{ts}End Date{/ts}: {$end_date|crmDate}
-{/if}
-{if $contact_email OR $contact_phone}
-
-{ts}For information about this premium, contact:{/ts}
-
-{if $contact_email}
- {$contact_email}
-{/if}
-{if $contact_phone}
- {$contact_phone}
-{/if}
-{/if}
-{if $is_deductible AND $price}
-
-{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
-{/if}
-
-{if $customPre}
-===========================================================
-{$customPre_grouptitle}
-
-===========================================================
-{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
-
-
-{if $customPost}
-===========================================================
-{$customPost_grouptitle}
-
-===========================================================
-{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.4.5.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- </table>
- <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Contribution Information{/ts}
- </th>
- </tr>
-
- {if $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney:$currency}
- </td>
- <td>
- {$line.line_total|crmMoney:$currency}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency}
- </td>
- </tr>
-
- {else}
-
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $is_recur}
- {if $contributeMode eq 'notify'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can modify or cancel future contributions by <a href="%1">logging in to your account</a>.{/ts}
- </td>
- </tr>
- {elseif $contributeMode eq 'directIPN' and $receiptFromEmail}
- <tr>
- <td {$labelStyle}>
- {ts 1=$receiptFromEmail}This is a recurring contribution. To modify or cancel future contributions please contact us at %1.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfProfile}
- <tr>
- <th {$headerStyle}>
- {$onBehalfProfile_grouptitle}
- </th>
- </tr>
- {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
- <tr>
- <td {$labelStyle}>
- {$onBehalfName}
- </td>
- <td {$valueStyle}>
- {$onBehalfValue}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
- <p>{$event.confirm_email_text|htmlize}</p>
- {/if}
-
- {if $isOnWaitlist}
- <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
- <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
- {/if}
- {elseif $isRequireApproval}
- <p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
- <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
- {/if}
- {elseif $is_pay_later && !$isAmountzero}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- </table>
- <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
- <tr>
- <th {$headerStyle}>
- {ts}Event Information and Location{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$event.event_title}<br />
- {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
- </td>
- </tr>
-
- {if $event.participant_role neq 'Attendee' and $defaultRole}
- <tr>
- <td {$labelStyle}>
- {ts}Participant Role{/ts}
- </td>
- <td {$valueStyle}>
- {$event.participant_role}
- </td>
- </tr>
- {/if}
-
- {if $isShowLocation}
- <tr>
- <td colspan="2" {$valueStyle}>
- {if $location.address.1.name}
- {$location.address.1.name}<br />
- {/if}
- {if $location.address.1.street_address}
- {$location.address.1.street_address}<br />
- {/if}
- {if $location.address.1.supplemental_address_1}
- {$location.address.1.supplemental_address_1}<br />
- {/if}
- {if $location.address.1.supplemental_address_2}
- {$location.address.1.supplemental_address_2}<br />
- {/if}
- {if $location.address.1.city}
- {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $location.phone.1.phone || $location.email.1.email}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts}Event Contacts:{/ts}
- </td>
- </tr>
- {foreach from=$location.phone item=phone}
- {if $phone.phone}
- <tr>
- <td {$labelStyle}>
- {if $phone.phone_type}
- {$phone.phone_type_display}
- {else}
- {ts}Phone{/ts}
- {/if}
- </td>
- <td {$valueStyle}>
- {$phone.phone}
- </td>
- </tr>
- {/if}
- {/foreach}
- {foreach from=$location.email item=eventEmail}
- {if $eventEmail.email}
- <tr>
- <td {$labelStyle}>
- {ts}Email{/ts}
- </td>
- <td {$valueStyle}>
- {$eventEmail.email}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
- <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
- </td>
- </tr>
- {if $email}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {/if}
-
-
- {if $event.is_monetary}
-
- <tr>
- <th {$headerStyle}>
- {$event.fee_label}
- </th>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- {if $value neq 'skip'}
- {if $isPrimary}
- {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- {if $pricesetFieldsCount }<td>{$line.participant_count}</td> {/if}
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $amount && !$lineItem}
- {foreach from=$amount item=amnt key=level}
- <tr>
- <td colspan="2" {$valueStyle}>
- {$amnt.amount|crmMoney} {$amnt.label}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if $isPrimary}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
- </td>
- </tr>
- {if $pricesetFieldsCount }
- <tr>
- <td {$labelStyle}>
- {ts}Total Participants{/ts}</td>
- <td {$valueStyle}>
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- {assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
- {$count}
- </td> </tr>
- {/if}
- {if $is_pay_later}
- <tr>
- <td colspan="2" {$labelStyle}>
- {$pay_later_receipt}
- </td>
- </tr>
- {/if}
-
- {if $register_date}
- <tr>
- <td {$labelStyle}>
- {ts}Registration Date{/ts}
- </td>
- <td {$valueStyle}>
- {$register_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $contributionTypeName}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$contributionTypeName}
- </td>
- </tr>
- {/if}
-
- {if $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$paidBy}
- </td>
- </tr>
- {/if}
-
- {if $checkNumber}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$checkNumber}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {/if}
-
- {/if} {* End of conditional section for Paid events *}
-
-{if $customPre}
-{foreach from=$customPre item=customPr key=i}
- <tr> <th {$headerStyle}>{$customPre_grouptitle.$i}</th></tr>
- {foreach from=$customPr item=customValue key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>{$customName}</td>
- <td {$valueStyle}>{$customValue}</td>
- </tr>
- {/if}
- {/foreach}
-{/foreach}
-{/if}
-
-{if $customPost}
-{foreach from=$customPost item=customPos key=j}
- <tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
- {foreach from=$customPos item=customValue key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>{$customName}</td>
- <td {$valueStyle}>{$customValue}</td>
- </tr>
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-
-{if $customProfile}
-{foreach from=$customProfile.profile item=eachParticipant key=participantID}
- <tr><th {$headerStyle}>{ts 1=$participantID+2}Participant Information - Participant %1{/ts} </th></tr>
- {foreach from=$eachParticipant item=eachProfile key=pid}
- <tr><th {$headerStyle}>{$customProfile.title.$pid}</th></tr>
- {foreach from=$eachProfile item=val key=field}
- <tr>{foreach from=$val item=v key=f}
- <td {$labelStyle}>{$field}</td>
- <td {$valueStyle}>{$v}</td>
- {/foreach}
- </tr>
- {/foreach}
-{/foreach}
-{/foreach}
-{/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
-{$event.confirm_email_text}
-{/if}
-
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}You have been added to the WAIT LIST for this event.{/ts}
-
-{if $isPrimary}
-{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Your registration has been submitted.{/ts}
-
-{if $isPrimary}
-{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
-
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $is_pay_later && !$isAmountzero}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{else}
-
-{ts}Please print this confirmation for your records.{/ts}
-{/if}
-
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Event Information and Location{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.event_title}
-{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
-
-{if $event.participant_role neq 'Attendee' and $defaultRole}
-{ts}Participant Role{/ts}: {$event.participant_role}
-{/if}
-
-{if $isShowLocation}
-{if $location.address.1.name}
-
-{$location.address.1.name}
-{/if}
-{if $location.address.1.street_address}{$location.address.1.street_address}
-{/if}
-{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
-{/if}
-{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
-{/if}
-{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
-{/if}
-
-{/if}{*End of isShowLocation condition*}
-
-{if $location.phone.1.phone || $location.email.1.email}
-
-{ts}Event Contacts:{/ts}
-{foreach from=$location.phone item=phone}
-{if $phone.phone}
-
-{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
-{/foreach}
-{foreach from=$location.email item=eventEmail}
-{if $eventEmail.email}
-
-{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
-{/if}
-
-{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
-{ts}Download iCalendar File:{/ts} {$icalFeed}
-{if $email}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Registered Email{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$email}
-{/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
-
-{if $value neq 'skip'}
-{if $isPrimary}
-{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
-{ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
-
-{/if}
-{/if}
------------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
------------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
-{/foreach}
-{/if}
-{/foreach}
-{/if}
-{if $amount && !$lineItem}
-{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
-{/foreach}
-{/if}
-{if $isPrimary }
-
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
-
-{if $pricesetFieldsCount }
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- {assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
-
-{ts}Total Participants{/ts}: {$count}
-{/if}
-
-{if $is_pay_later }
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{/if}
-
-{if $register_date}
-{ts}Registration Date{/ts}: {$register_date|crmDate}
-{/if}
-{if $receive_date}
-{ts}Transaction Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $contributionTypeName}
-{ts}Contribution Type{/ts}: {$contributionTypeName}
-{/if}
-{if $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-{if $paidBy}
-{ts}Paid By{/ts}: {$paidBy}
-{/if}
-{if $checkNumber}
-{ts}Check Number{/ts}: {$checkNumber}
-{/if}
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Billing Name and Address{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Credit Card Information{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-{/if} {* End of conditional section for Paid events *}
-
-
-{if $customPre}
-{foreach from=$customPre item=customPr key=i}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPre_grouptitle.$i}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPr item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-
-{if $customPost}
-{foreach from=$customPost item=customPos key=j}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPost_grouptitle.$j}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPos item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-{if $customProfile}
-
-{foreach from=$customProfile.profile item=eachParticipant key=participantID}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts 1=$participantID+2}Participant Information - Participant %1{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$eachParticipant item=eachProfile key=pid}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{$customProfile.title.$pid}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{foreach from=$eachProfile item=val key=field}
-{foreach from=$val item=v key=f}
-{$field}: {$v}
-{/foreach}
-{/foreach}
-{/foreach}
-{/foreach}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- </table>
- <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
-
- {if $membership_assign}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership Type{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_name}
- </td>
- </tr>
- {if $mem_start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $mem_end_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_end_date|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
-
- {if $membership_amount}
-
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
- {if $amount}
- {if ! $is_separate_payment }
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {else}
- <tr>
- <td {$labelStyle}>
- {ts}Additional Contribution{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Total{/ts}
- </td>
- <td {$valueStyle}>
- {$amount+$membership_amount|crmMoney}
- </td>
- </tr>
-
- {elseif $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
-
- {else}
-
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {elseif $membership_amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $membership_trx_id}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_trx_id}
- </td>
- </tr>
- {/if}
- {if $is_recur}
- {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfProfile}
- <tr>
- <th {$headerStyle}>
- {$onBehalfProfile_grouptitle}
- </th>
- </tr>
- {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
- <tr>
- <td {$labelStyle}>
- {$onBehalfName}
- </td>
- <td {$valueStyle}>
- {$onBehalfValue}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0 OR $membership_amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.4.6.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
- {if $formValues.receipt_text_signup}
- <p>{$formValues.receipt_text_signup|htmlize}</p>
- {elseif $formValues.receipt_text_renewal}
- <p>{$formValues.receipt_text_renewal|htmlize}</p>
- {else}
- <p>{ts}Thank you for your support.{/ts}</p>
- {/if}
- {if ! $cancelled}
- <p>{ts}Please print this receipt for your records.{/ts}</p>
- {/if}
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- {if !$lineItem}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership Type{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_name}
- </td>
- </tr>
- {/if}
- {if ! $cancelled}
- {if !$lineItem}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_start_date}
- </td>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_end_date}
- </td>
- </tr>
- {/if}
- {if $formValues.total_amount}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
- {if $formValues.contributionType_name}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.contributionType_name}
- </td>
- </tr>
- {/if}
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- <th>{ts}Membership Start Date{/ts}</th>
- <th>{ts}Membership End Date{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- <td>
- {$line.start_date}
- </td>
- <td>
- {$line.end_date}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.total_amount|crmMoney}
- </td>
- </tr>
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Received Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
- {if $formValues.paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.paidBy}
- </td>
- </tr>
- {if $formValues.check_number}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.check_number}
- </td>
- </tr>
- {/if}
- {/if}
- {/if}
- {/if}
- </table>
- </td>
- </tr>
-
- {if $isPrimary}
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {$billingName}<br />
- {$address}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}
- </td>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Expires{/ts}
- </td>
- <td {$valueStyle}>
- {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- </table>
- </td>
- </tr>
- {/if}
-
- {if $customValues}
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Membership Options{/ts}
- </th>
- </tr>
- {foreach from=$customValues item=value key=customName}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $formValues.receipt_text_signup}
-{$formValues.receipt_text_signup}
-{elseif $formValues.receipt_text_renewal}
-{$formValues.receipt_text_renewal}
-{else}{ts}Thank you for your support.{/ts}{/if}
-
-{if ! $cancelled}{ts}Please print this receipt for your records.{/ts}
-
-
-{/if}
-{if !$lineItem}
-===========================================================
-{ts}Membership Information{/ts}
-
-===========================================================
-{ts}Membership Type{/ts}: {$membership_name}
-{/if}
-{if ! $cancelled}
-{if !$lineItem}
-{ts}Membership Start Date{/ts}: {$mem_start_date}
-{ts}Membership End Date{/ts}: {$mem_end_date}
-{/if}
-{if $formValues.total_amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{if $formValues.contributionType_name}
-{ts}Contribution Type{/ts}: {$formValues.contributionType_name}
-{/if}
-{if $lineItem}
-{foreach from=$lineItem item=value key=priceset}
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
-{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
---------------------------------------------------------------------------------------------------
-
-{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
-{/foreach}
-{/foreach}
---------------------------------------------------------------------------------------------------
-{/if}
-
-{ts}Amount{/ts}: {$formValues.total_amount|crmMoney}
-{if $receive_date}
-{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
-{/if}
-{if $formValues.paidBy}
-{ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
-{ts}Check Number{/ts}: {$formValues.check_number}
-{/if}
-{/if}
-{/if}
-{/if}
-
-{if $isPrimary }
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
-
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-
-{if $customValues}
-===========================================================
-{ts}Membership Options{/ts}
-
-===========================================================
-{foreach from=$customValues item=value key=customName}
- {$customName} : {$value}
-{/foreach}
-{/if}
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- </table>
- <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
-
- {if $membership_assign && !$useForMember}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership Type{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_name}
- </td>
- </tr>
- {if $mem_start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $mem_end_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_end_date|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
-
- {if !$useForMember && $membership_amount}
-
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
- {if $amount}
- {if ! $is_separate_payment }
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {else}
- <tr>
- <td {$labelStyle}>
- {ts}Additional Contribution{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Total{/ts}
- </td>
- <td {$valueStyle}>
- {$amount+$membership_amount|crmMoney}
- </td>
- </tr>
-
- {elseif !$useForMember && $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
-
- {else}
- {if $useForMember && $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- <th>{ts}Membership Start Date{/ts}</th>
- <th>{ts}Membership End Date{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- <td>
- {$line.start_date}
- </td>
- <td>
- {$line.end_date}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {elseif $membership_amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $membership_trx_id}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_trx_id}
- </td>
- </tr>
- {/if}
- {if $is_recur}
- {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfProfile}
- <tr>
- <th {$headerStyle}>
- {$onBehalfProfile_grouptitle}
- </th>
- </tr>
- {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
- <tr>
- <td {$labelStyle}>
- {$onBehalfName}
- </td>
- <td {$valueStyle}>
- {$onBehalfValue}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0 OR $membership_amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $receipt_text}
-{$receipt_text}
-{/if}
-{if $is_pay_later}
-
-===========================================================
-{$pay_later_receipt}
-===========================================================
-{else}
-
-{ts}Please print this receipt for your records.{/ts}
-{/if}
-
-{if $membership_assign && !$useForMember}
-===========================================================
-{ts}Membership Information{/ts}
-
-===========================================================
-{ts}Membership Type{/ts}: {$membership_name}
-{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate}
-{/if}
-{if $mem_end_date}{ts}Membership End Date{/ts}: {$mem_end_date|crmDate}
-{/if}
-
-{/if}
-{if $amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{if !$useForMember && $membership_amount }
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{if $amount}
-{if ! $is_separate_payment }
-{ts}Contribution Amount{/ts}: {$amount|crmMoney}
-{else}
-{ts}Additional Contribution{/ts}: {$amount|crmMoney}
-{/if}
-{/if}
--------------------------------------------
-{ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
-{elseif !$useForMember && $lineItem and $priceSetID}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
-{/foreach}
-{/foreach}
-
-{ts}Total Amount{/ts}: {$amount|crmMoney}
-{else}
-{if $useForMember && $lineItem}
-{foreach from=$lineItem item=value key=priceset}
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
-{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
---------------------------------------------------------------------------------------------------
-
-{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
-{/foreach}
-{/foreach}
---------------------------------------------------------------------------------------------------
-{/if}
-{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
-{/if}
-{elseif $membership_amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{/if}
-{if $receive_date}
-
-{ts}Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $is_monetary and $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-
-{/if}
-{if $membership_trx_id}
-{ts}Membership Transaction #{/ts}: {$membership_trx_id}
-
-{/if}
-{if $is_recur}
-{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
-{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by visiting this web page: %1.{/ts}
-{/if}
-{/if}
-
-{if $honor_block_is_active }
-===========================================================
-{$honor_type}
-===========================================================
-{$honor_prefix} {$honor_first_name} {$honor_last_name}
-{if $honor_email}
-{ts}Honoree Email{/ts}: {$honor_email}
-{/if}
-
-{/if}
-{if $pcpBlock}
-===========================================================
-{ts}Personal Campaign Page{/ts}
-
-===========================================================
-{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
-
-{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
-
-{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
-
-{/if}
-{if $onBehalfProfile}
-===========================================================
-{ts}On Behalf Of{/ts}
-
-===========================================================
-{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
-{$onBehalfName}: {$onBehalfValue}
-{/foreach}
-{/if}
-
-{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
-{if $is_pay_later}
-===========================================================
-{ts}Registered Email{/ts}
-
-===========================================================
-{$email}
-{elseif $amount GT 0 OR $membership_amount GT 0 }
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-{$email}
-{/if} {* End ! is_pay_later condition. *}
-{/if}
-{if $contributeMode eq 'direct' AND !$is_pay_later AND ( $amount GT 0 OR $membership_amount GT 0 ) }
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-
-{if $selectPremium }
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$product_name}
-{if $option}
-{ts}Option{/ts}: {$option}
-{/if}
-{if $sku}
-{ts}SKU{/ts}: {$sku}
-{/if}
-{if $start_date}
-{ts}Start Date{/ts}: {$start_date|crmDate}
-{/if}
-{if $end_date}
-{ts}End Date{/ts}: {$end_date|crmDate}
-{/if}
-{if $contact_email OR $contact_phone}
-
-{ts}For information about this premium, contact:{/ts}
-
-{if $contact_email}
- {$contact_email}
-{/if}
-{if $contact_phone}
- {$contact_phone}
-{/if}
-{/if}
-{if $is_deductible AND $price}
-
-{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
-{/if}
-
-{if $customPre}
-===========================================================
-{$customPre_grouptitle}
-
-===========================================================
-{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
-
-
-{if $customPost}
-===========================================================
-{$customPost_grouptitle}
-
-===========================================================
-{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
+++ /dev/null
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.4.7.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
- {if $formValues.receipt_text_signup}
- <p>{$formValues.receipt_text_signup|htmlize}</p>
- {elseif $formValues.receipt_text_renewal}
- <p>{$formValues.receipt_text_renewal|htmlize}</p>
- {else}
- <p>{ts}Thank you for your support.{/ts}</p>
- {/if}
- {if ! $cancelled}
- <p>{ts}Please print this receipt for your records.{/ts}</p>
- {/if}
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- {if !$lineItem}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership Type{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_name}
- </td>
- </tr>
- {/if}
- {if ! $cancelled}
- {if !$lineItem}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_start_date}
- </td>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_end_date}
- </td>
- </tr>
- {/if}
- {if $formValues.total_amount}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
- {if $formValues.contributionType_name}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.contributionType_name}
- </td>
- </tr>
- {/if}
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Fee{/ts}</th>
- <th>{ts}Membership Start Date{/ts}</th>
- <th>{ts}Membership End Date{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- <td>
- {$line.start_date}
- </td>
- <td>
- {$line.end_date}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.total_amount|crmMoney}
- </td>
- </tr>
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Received Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|truncate:10:''|crmDate}
- </td>
- </tr>
- {/if}
- {if $formValues.paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.paidBy}
- </td>
- </tr>
- {if $formValues.check_number}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$formValues.check_number}
- </td>
- </tr>
- {/if}
- {/if}
- {/if}
- {/if}
- </table>
- </td>
- </tr>
-
- {if $isPrimary}
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {$billingName}<br />
- {$address}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}
- </td>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Expires{/ts}
- </td>
- <td {$valueStyle}>
- {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- </table>
- </td>
- </tr>
- {/if}
-
- {if $customValues}
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Membership Options{/ts}
- </th>
- </tr>
- {foreach from=$customValues item=value key=customName}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $formValues.receipt_text_signup}
-{$formValues.receipt_text_signup}
-{elseif $formValues.receipt_text_renewal}
-{$formValues.receipt_text_renewal}
-{else}{ts}Thank you for your support.{/ts}{/if}
-
-{if ! $cancelled}{ts}Please print this receipt for your records.{/ts}
-
-
-{/if}
-{if !$lineItem}
-===========================================================
-{ts}Membership Information{/ts}
-
-===========================================================
-{ts}Membership Type{/ts}: {$membership_name}
-{/if}
-{if ! $cancelled}
-{if !$lineItem}
-{ts}Membership Start Date{/ts}: {$mem_start_date}
-{ts}Membership End Date{/ts}: {$mem_end_date}
-{/if}
-{if $formValues.total_amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{if $formValues.contributionType_name}
-{ts}Contribution Type{/ts}: {$formValues.contributionType_name}
-{/if}
-{if $lineItem}
-{foreach from=$lineItem item=value key=priceset}
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_total}{ts}Fee{/ts}{/capture}
-{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
-{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
---------------------------------------------------------------------------------------------------
-
-{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
-{/foreach}
-{/foreach}
---------------------------------------------------------------------------------------------------
-{/if}
-
-{ts}Amount{/ts}: {$formValues.total_amount|crmMoney}
-{if $receive_date}
-{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
-{/if}
-{if $formValues.paidBy}
-{ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
-{ts}Check Number{/ts}: {$formValues.check_number}
-{/if}
-{/if}
-{/if}
-{/if}
-
-{if $isPrimary }
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
-
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-
-{if $customValues}
-===========================================================
-{ts}Membership Options{/ts}
-
-===========================================================
-{foreach from=$customValues item=value key=customName}
- {$customName} : {$value}
-{/foreach}
-{/if}
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $receipt_text}
- <p>{$receipt_text|htmlize}</p>
- {/if}
-
- {if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- </table>
- <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
-
- {if $membership_assign && !$useForMember}
- <tr>
- <th {$headerStyle}>
- {ts}Membership Information{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Membership Type{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_name}
- </td>
- </tr>
- {if $mem_start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $mem_end_date}
- <tr>
- <td {$labelStyle}>
- {ts}Membership End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$mem_end_date|crmDate}
- </td>
- </tr>
- {/if}
- {/if}
-
-
- {if $amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
-
- {if !$useForMember && $membership_amount}
-
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
- {if $amount}
- {if ! $is_separate_payment }
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {else}
- <tr>
- <td {$labelStyle}>
- {ts}Additional Contribution{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Total{/ts}
- </td>
- <td {$valueStyle}>
- {$amount+$membership_amount|crmMoney}
- </td>
- </tr>
-
- {elseif !$useForMember && $lineItem and $priceSetID}
-
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {$line.description|truncate:30:"..."}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney}
- </td>
- </tr>
-
- {else}
- {if $useForMember && $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Fee{/ts}</th>
- <th>{ts}Membership Start Date{/ts}</th>
- <th>{ts}Membership End Date{/ts}</th>
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- <td>
- {$line.start_date}
- </td>
- <td>
- {$line.end_date}
- </td>
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/foreach}
- {/if}
- <tr>
- <td {$labelStyle}>
- {ts}Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
- </td>
- </tr>
-
- {/if}
-
-
- {elseif $membership_amount}
-
-
- <tr>
- <th {$headerStyle}>
- {ts}Membership Fee{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts 1=$membership_name}%1 Membership{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_amount|crmMoney}
- </td>
- </tr>
-
-
- {/if}
-
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $is_monetary and $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $membership_trx_id}
- <tr>
- <td {$labelStyle}>
- {ts}Membership Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$membership_trx_id}
- </td>
- </tr>
- {/if}
- {if $is_recur}
- {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
- <tr>
- <td {$labelStyle}>
- {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $honor_block_is_active}
- <tr>
- <th {$headerStyle}>
- {$honor_type}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$honor_prefix} {$honor_first_name} {$honor_last_name}
- </td>
- </tr>
- {if $honor_email}
- <tr>
- <td {$labelStyle}>
- {ts}Honoree Email{/ts}
- </td>
- <td {$valueStyle}>
- {$honor_email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $pcpBlock}
- <tr>
- <th {$headerStyle}>
- {ts}Personal Campaign Page{/ts}
- </th>
- </tr>
- <tr>
- <td {$labelStyle}>
- {ts}Display In Honor Roll{/ts}
- </td>
- <td {$valueStyle}>
- {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
- </td>
- </tr>
- {if $pcp_roll_nickname}
- <tr>
- <td {$labelStyle}>
- {ts}Nickname{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_roll_nickname}
- </td>
- </tr>
- {/if}
- {if $pcp_personal_note}
- <tr>
- <td {$labelStyle}>
- {ts}Personal Note{/ts}
- </td>
- <td {$valueStyle}>
- {$pcp_personal_note}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $onBehalfProfile}
- <tr>
- <th {$headerStyle}>
- {$onBehalfProfile_grouptitle}
- </th>
- </tr>
- {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
- <tr>
- <td {$labelStyle}>
- {$onBehalfName}
- </td>
- <td {$valueStyle}>
- {$onBehalfValue}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
- {if $is_pay_later}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {elseif $amount GT 0 OR $membership_amount GT 0}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}<br />
- {$email}
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
- </td>
- </tr>
- {/if}
-
- {if $selectPremium}
- <tr>
- <th {$headerStyle}>
- {ts}Premium Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$labelStyle}>
- {$product_name}
- </td>
- </tr>
- {if $option}
- <tr>
- <td {$labelStyle}>
- {ts}Option{/ts}
- </td>
- <td {$valueStyle}>
- {$option}
- </td>
- </tr>
- {/if}
- {if $sku}
- <tr>
- <td {$labelStyle}>
- {ts}SKU{/ts}
- </td>
- <td {$valueStyle}>
- {$sku}
- </td>
- </tr>
- {/if}
- {if $start_date}
- <tr>
- <td {$labelStyle}>
- {ts}Start Date{/ts}
- </td>
- <td {$valueStyle}>
- {$start_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $end_date}
- <tr>
- <td {$labelStyle}>
- {ts}End Date{/ts}
- </td>
- <td {$valueStyle}>
- {$end_date|crmDate}
- </td>
- </tr>
- {/if}
- {if $contact_email OR $contact_phone}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
- <p>{$contact_email}</p>
- {/if}
- {if $contact_phone}
- <p>{$contact_phone}</p>
- {/if}
- </td>
- </tr>
- {/if}
- {if $is_deductible AND $price}
- <tr>
- <td colspan="2" {$valueStyle}>
- <p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
- </td>
- </tr>
- {/if}
- {/if}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$customValue}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $receipt_text}
-{$receipt_text}
-{/if}
-{if $is_pay_later}
-
-===========================================================
-{$pay_later_receipt}
-===========================================================
-{else}
-
-{ts}Please print this receipt for your records.{/ts}
-{/if}
-
-{if $membership_assign && !$useForMember}
-===========================================================
-{ts}Membership Information{/ts}
-
-===========================================================
-{ts}Membership Type{/ts}: {$membership_name}
-{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate}
-{/if}
-{if $mem_end_date}{ts}Membership End Date{/ts}: {$mem_end_date|crmDate}
-{/if}
-
-{/if}
-{if $amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{if !$useForMember && $membership_amount }
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{if $amount}
-{if ! $is_separate_payment }
-{ts}Contribution Amount{/ts}: {$amount|crmMoney}
-{else}
-{ts}Additional Contribution{/ts}: {$amount|crmMoney}
-{/if}
-{/if}
--------------------------------------------
-{ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
-{elseif !$useForMember && $lineItem and $priceSetID}
-{foreach from=$lineItem item=value key=priceset}
----------------------------------------------------------
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
-----------------------------------------------------------
-{foreach from=$value item=line}
-{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
-{/foreach}
-{/foreach}
-
-{ts}Total Amount{/ts}: {$amount|crmMoney}
-{else}
-{if $useForMember && $lineItem}
-{foreach from=$lineItem item=value key=priceset}
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_total}{ts}Fee{/ts}{/capture}
-{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
-{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
---------------------------------------------------------------------------------------------------
-
-{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
-{/foreach}
-{/foreach}
---------------------------------------------------------------------------------------------------
-{/if}
-{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
-{/if}
-{elseif $membership_amount}
-===========================================================
-{ts}Membership Fee{/ts}
-
-===========================================================
-{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
-{/if}
-{if $receive_date}
-
-{ts}Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $is_monetary and $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-
-{/if}
-{if $membership_trx_id}
-{ts}Membership Transaction #{/ts}: {$membership_trx_id}
-
-{/if}
-{if $is_recur}
-{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
-{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can modify or cancel the auto-renewal option by visiting this web page: %1.{/ts}
-{/if}
-{/if}
-
-{if $honor_block_is_active }
-===========================================================
-{$honor_type}
-===========================================================
-{$honor_prefix} {$honor_first_name} {$honor_last_name}
-{if $honor_email}
-{ts}Honoree Email{/ts}: {$honor_email}
-{/if}
-
-{/if}
-{if $pcpBlock}
-===========================================================
-{ts}Personal Campaign Page{/ts}
-
-===========================================================
-{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
-
-{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
-
-{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
-
-{/if}
-{if $onBehalfProfile}
-===========================================================
-{ts}On Behalf Of{/ts}
-
-===========================================================
-{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
-{$onBehalfName}: {$onBehalfValue}
-{/foreach}
-{/if}
-
-{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
-{if $is_pay_later}
-===========================================================
-{ts}Registered Email{/ts}
-
-===========================================================
-{$email}
-{elseif $amount GT 0 OR $membership_amount GT 0 }
-===========================================================
-{ts}Billing Name and Address{/ts}
-
-===========================================================
-{$billingName}
-{$address}
-
-{$email}
-{/if} {* End ! is_pay_later condition. *}
-{/if}
-{if $contributeMode eq 'direct' AND !$is_pay_later AND ( $amount GT 0 OR $membership_amount GT 0 ) }
-
-===========================================================
-{ts}Credit Card Information{/ts}
-
-===========================================================
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-
-{if $selectPremium }
-===========================================================
-{ts}Premium Information{/ts}
-
-===========================================================
-{$product_name}
-{if $option}
-{ts}Option{/ts}: {$option}
-{/if}
-{if $sku}
-{ts}SKU{/ts}: {$sku}
-{/if}
-{if $start_date}
-{ts}Start Date{/ts}: {$start_date|crmDate}
-{/if}
-{if $end_date}
-{ts}End Date{/ts}: {$end_date|crmDate}
-{/if}
-{if $contact_email OR $contact_phone}
-
-{ts}For information about this premium, contact:{/ts}
-
-{if $contact_email}
- {$contact_email}
-{/if}
-{if $contact_phone}
- {$contact_phone}
-{/if}
-{/if}
-{if $is_deductible AND $price}
-
-{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
-{/if}
-
-{if $customPre}
-===========================================================
-{$customPre_grouptitle}
-
-===========================================================
-{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
-
-
-{if $customPost}
-===========================================================
-{$customPost_grouptitle}
-
-===========================================================
-{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- {$customName}: {$customValue}
-{/if}
-{/foreach}
-{/if}
+++ /dev/null
--- 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
- ( '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` )
-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 );
-
-SELECT @tpl_ovid_petition_sign := MAX(id) FROM civicrm_option_value WHERE option_group_id = @option_group_id AND name = 'petition_sign';
-SELECT @tpl_ovid_petition_confirmation_needed := MAX(id) FROM civicrm_option_value WHERE option_group_id = @option_group_id AND name = 'petition_confirmation_needed';
-
--- get the petition sign template values.
-{fetch assign=subject_petition_sign file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_sign_subject.tpl"}
-{fetch assign=text_petition_sign file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_sign_text.tpl"}
-{fetch assign=html_petition_sign file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_sign_html.tpl"}
-
--- get the petition confirmation needed template values.
-{fetch assign=subject_petition_confirmation_needed file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/3.4.beta2.msg_template/message_templates/petition_confirmation_needed_subject.tpl"}
-{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)
- 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),
-
- ('{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, 0, 1),
-
- ('{ts escape="sql"}Petition - need verification{/ts}', '{$subject_petition_confirmation_needed|escape:"quotes"}', '{$text_petition_confirmation_needed|escape:"quotes"}', '{$html_petition_confirmation_needed|escape:"quotes"}', @tpl_ovid_petition_confirmation_needed, 1, 0),
-
- ('{ts escape="sql"}Petition - need verification{/ts}', '{$subject_petition_confirmation_needed|escape:"quotes"}', '{$text_petition_confirmation_needed|escape:"quotes"}', '{$html_petition_confirmation_needed|escape:"quotes"}', @tpl_ovid_petition_confirmation_needed, 0, 1);
-
-{/if}
-
--- CRM-7834
-{php}
- $dir = SMARTY_DIR . '/../../CRM/Upgrade/3.4.beta2.msg_template/message_templates';
- $templates = array();
- foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
- $parts = explode('_', basename($filename, '.tpl'));
- $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
- }
- $this->assign('templates', $templates);
-{/php}
-
-{foreach from=$templates item=tpl}
- {fetch assign=content file=$tpl.filename}
- SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
- SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
- UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
-{/foreach}
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
-</head>
-<body>
-
-{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}
-
-<center>
- <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
-
- <!-- BEGIN HEADER -->
- <!-- You can add table row(s) here with logo or other header elements -->
- <!-- END HEADER -->
-
- <!-- BEGIN CONTENT -->
-
- <tr>
- <td>
-
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
- <p>{$event.confirm_email_text|htmlize}</p>
- {/if}
-
- {if $isOnWaitlist}
- <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
- <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
- {/if}
- {elseif $isRequireApproval}
- <p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
- <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
- {/if}
- {elseif $is_pay_later && !$isAmountzero}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
- {else}
- <p>{ts}Please print this confirmation for your records.{/ts}</p>
- {/if}
-
- </td>
- </tr>
- <tr>
- <td>
- <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- <tr>
- <th {$headerStyle}>
- {ts}Event Information and Location{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$event.event_title}<br />
- {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
- </td>
- </tr>
-
- {if $event.participant_role neq 'Attendee' and $defaultRole}
- <tr>
- <td {$labelStyle}>
- {ts}Participant Role{/ts}
- </td>
- <td {$valueStyle}>
- {$event.participant_role}
- </td>
- </tr>
- {/if}
-
- {if $isShowLocation}
- <tr>
- <td colspan="2" {$valueStyle}>
- {if $location.address.1.name}
- {$location.address.1.name}<br />
- {/if}
- {if $location.address.1.street_address}
- {$location.address.1.street_address}<br />
- {/if}
- {if $location.address.1.supplemental_address_1}
- {$location.address.1.supplemental_address_1}<br />
- {/if}
- {if $location.address.1.supplemental_address_2}
- {$location.address.1.supplemental_address_2}<br />
- {/if}
- {if $location.address.1.city}
- {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
- {/if}
- </td>
- </tr>
- {/if}
-
- {if $location.phone.1.phone || $location.email.1.email}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts}Event Contacts:{/ts}
- </td>
- </tr>
- {foreach from=$location.phone item=phone}
- {if $phone.phone}
- <tr>
- <td {$labelStyle}>
- {if $phone.phone_type}
- {$phone.phone_type_display}
- {else}
- {ts}Phone{/ts}
- {/if}
- </td>
- <td {$valueStyle}>
- {$phone.phone}
- </td>
- </tr>
- {/if}
- {/foreach}
- {foreach from=$location.email item=eventEmail}
- {if $eventEmail.email}
- <tr>
- <td {$labelStyle}>
- {ts}Email{/ts}
- </td>
- <td {$valueStyle}>
- {$eventEmail.email}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
- <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
- </td>
- </tr>
- {if $email}
- <tr>
- <th {$headerStyle}>
- {ts}Registered Email{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$email}
- </td>
- </tr>
- {/if}
-
-
- {if $event.is_monetary}
-
- <tr>
- <th {$headerStyle}>
- {$event.fee_label}
- </th>
- </tr>
-
- {if $lineItem}
- {foreach from=$lineItem item=value key=priceset}
- {if $value neq 'skip'}
- {if $isPrimary}
- {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
- <tr>
- <td colspan="2" {$labelStyle}>
- {ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
- </td>
- </tr>
- {/if}
- {/if}
- <tr>
- <td colspan="2" {$valueStyle}>
- <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
- <tr>
- <th>{ts}Item{/ts}</th>
- <th>{ts}Qty{/ts}</th>
- <th>{ts}Each{/ts}</th>
- <th>{ts}Total{/ts}</th>
- {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
- </tr>
- {foreach from=$value item=line}
- <tr>
- <td>
- {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
- </td>
- <td>
- {$line.qty}
- </td>
- <td>
- {$line.unit_price|crmMoney}
- </td>
- <td>
- {$line.line_total|crmMoney}
- </td>
- {if $pricesetFieldsCount }<td>{$line.participant_count}</td> {/if}
- </tr>
- {/foreach}
- </table>
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $amount && !$lineItem}
- {foreach from=$amount item=amnt key=level}
- <tr>
- <td colspan="2" {$valueStyle}>
- {$amnt.amount|crmMoney} {$amnt.label}
- </td>
- </tr>
- {/foreach}
- {/if}
-
- {if $isPrimary}
- <tr>
- <td {$labelStyle}>
- {ts}Total Amount{/ts}
- </td>
- <td {$valueStyle}>
- {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
- </td>
- </tr>
- {if $pricesetFieldsCount }
- <tr>
- <td {$labelStyle}>
- {ts}Total Participants{/ts}</td>
- <td {$valueStyle}>
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- {assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
- {$count}
- </td> </tr>
- {/if}
- {if $is_pay_later}
- <tr>
- <td colspan="2" {$labelStyle}>
- {$pay_later_receipt}
- </td>
- </tr>
- {/if}
-
- {if $register_date}
- <tr>
- <td {$labelStyle}>
- {ts}Registration Date{/ts}
- </td>
- <td {$valueStyle}>
- {$register_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $receive_date}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction Date{/ts}
- </td>
- <td {$valueStyle}>
- {$receive_date|crmDate}
- </td>
- </tr>
- {/if}
-
- {if $contributionTypeName}
- <tr>
- <td {$labelStyle}>
- {ts}Contribution Type{/ts}
- </td>
- <td {$valueStyle}>
- {$contributionTypeName}
- </td>
- </tr>
- {/if}
-
- {if $trxn_id}
- <tr>
- <td {$labelStyle}>
- {ts}Transaction #{/ts}
- </td>
- <td {$valueStyle}>
- {$trxn_id}
- </td>
- </tr>
- {/if}
-
- {if $paidBy}
- <tr>
- <td {$labelStyle}>
- {ts}Paid By{/ts}
- </td>
- <td {$valueStyle}>
- {$paidBy}
- </td>
- </tr>
- {/if}
-
- {if $checkNumber}
- <tr>
- <td {$labelStyle}>
- {ts}Check Number{/ts}
- </td>
- <td {$valueStyle}>
- {$checkNumber}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Billing Name and Address{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$billingName}<br />
- {$address|nl2br}
- </td>
- </tr>
- {/if}
-
- {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
- <tr>
- <th {$headerStyle}>
- {ts}Credit Card Information{/ts}
- </th>
- </tr>
- <tr>
- <td colspan="2" {$valueStyle}>
- {$credit_card_type}<br />
- {$credit_card_number}<br />
- {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
- </td>
- </tr>
- {/if}
-
- {/if}
-
- {/if} {* End of conditional section for Paid events *}
-
- {if $customPre}
- <tr>
- <th {$headerStyle}>
- {$customPre_grouptitle}
- </th>
- </tr>
- {foreach from=$customPre item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customPost}
- <tr>
- <th {$headerStyle}>
- {$customPost_grouptitle}
- </th>
- </tr>
- {foreach from=$customPost item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
- <tr>
- <td {$labelStyle}>
- {$customName}
- </td>
- <td {$valueStyle}>
- {$value}
- </td>
- </tr>
- {/if}
- {/foreach}
- {/if}
-
- {if $customProfile}
- {foreach from=$customProfile item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {ts 1=$customName+1}Participant Information - Participant %1{/ts}
- </th>
- </tr>
- {foreach from=$value item=val key=field}
- {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
- <tr>
- <td colspan="2" {$labelStyle}>
- {if $field eq 'additionalCustomPre'}
- {$additionalCustomPre_grouptitle}
- {else}
- {$additionalCustomPost_grouptitle}
- {/if}
- </td>
- </tr>
- {foreach from=$val item=v key=f}
- <tr>
- <td {$labelStyle}>
- {$f}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/if}
- {/foreach}
- {/foreach}
- {/if}
-
- {if $customGroup}
- {foreach from=$customGroup item=value key=customName}
- <tr>
- <th {$headerStyle}>
- {$customName}
- </th>
- </tr>
- {foreach from=$value item=v key=n}
- <tr>
- <td {$labelStyle}>
- {$n}
- </td>
- <td {$valueStyle}>
- {$v}
- </td>
- </tr>
- {/foreach}
- {/foreach}
- {/if}
-
- </table>
- </td>
- </tr>
-
- </table>
-</center>
-
-</body>
-</html>
+++ /dev/null
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
-{$event.confirm_email_text}
-{/if}
-
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}You have been added to the WAIT LIST for this event.{/ts}
-
-{if $isPrimary}
-{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Your registration has been submitted.{/ts}
-
-{if $isPrimary}
-{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
-
-{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{elseif $is_pay_later && !$isAmountzero}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{else}
-
-{ts}Please print this confirmation for your records.{/ts}
-{/if}
-
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Event Information and Location{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.event_title}
-{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
-
-{if $event.participant_role neq 'Attendee' and $defaultRole}
-{ts}Participant Role{/ts}: {$event.participant_role}
-{/if}
-
-{if $isShowLocation}
-{if $location.address.1.name}
-
-{$location.address.1.name}
-{/if}
-{if $location.address.1.street_address}{$location.address.1.street_address}
-{/if}
-{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
-{/if}
-{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
-{/if}
-{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
-{/if}
-
-{/if}{*End of isShowLocation condition*}
-
-{if $location.phone.1.phone || $location.email.1.email}
-
-{ts}Event Contacts:{/ts}
-{foreach from=$location.phone item=phone}
-{if $phone.phone}
-
-{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
-{/foreach}
-{foreach from=$location.email item=eventEmail}
-{if $eventEmail.email}
-
-{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
-{/if}
-
-{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
-{ts}Download iCalendar File:{/ts} {$icalFeed}
-{if $email}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Registered Email{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$email}
-{/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
-
-{if $value neq 'skip'}
-{if $isPrimary}
-{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
-{ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
-
-{/if}
-{/if}
------------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{capture assign=ts_item}{ts}Item{/ts}{/capture}
-{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
------------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
-{/foreach}
-{/if}
-{/foreach}
-{/if}
-{if $amount && !$lineItem}
-{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
-{/foreach}
-{/if}
-{if $isPrimary }
-
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
-
-{if $pricesetFieldsCount }
- {assign var="count" value= 0}
- {foreach from=$lineItem item=pcount}
- {assign var="lineItemCount" value=0}
- {if $pcount neq 'skip'}
- {foreach from=$pcount item=p_count}
- {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
- {/foreach}
- {if $lineItemCount < 1 }
- {assign var="lineItemCount" value=1}
- {/if}
- {assign var="count" value=$count+$lineItemCount}
- {/if}
- {/foreach}
-
-{ts}Total Participants{/ts}: {$count}
-{/if}
-
-{if $is_pay_later }
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{/if}
-
-{if $register_date}
-{ts}Registration Date{/ts}: {$register_date|crmDate}
-{/if}
-{if $receive_date}
-{ts}Transaction Date{/ts}: {$receive_date|crmDate}
-{/if}
-{if $contributionTypeName}
-{ts}Contribution Type{/ts}: {$contributionTypeName}
-{/if}
-{if $trxn_id}
-{ts}Transaction #{/ts}: {$trxn_id}
-{/if}
-{if $paidBy}
-{ts}Paid By{/ts}: {$paidBy}
-{/if}
-{if $checkNumber}
-{ts}Check Number{/ts}: {$checkNumber}
-{/if}
-{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Billing Name and Address{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$billingName}
-{$address}
-{/if}
-
-{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts}Credit Card Information{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$credit_card_type}
-{$credit_card_number}
-{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
-{/if}
-{/if}
-{/if} {* End of conditional section for Paid events *}
-
-{if $customPre}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPre_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPre item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-
-{if $customPost}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customPost_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$customPost item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
-{$customName}: {$value}
-{/if}
-{/foreach}
-{/if}
-{if $customProfile}
-
-{foreach from=$customProfile item=value key=customName}
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{ts 1=$customName+1}Participant Information - Participant %1{/ts}
-
-==========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$value item=val key=field}
-{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
-{if $field eq 'additionalCustomPre' }
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{$additionalCustomPre_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{else}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{$additionalCustomPost_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
-
-{/if}
-{foreach from=$val item=v key=f}
-{$f}: {$v}
-{/foreach}
-{/if}
-{/foreach}
-{/foreach}
-{/if}
-{if $customGroup}
-{foreach from=$customGroup item=value key=customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{$customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
-
-{foreach from=$value item=v key=n}
-{$n}: {$v}
-{/foreach}
-{/foreach}
-{/if}
+++ /dev/null
-<p>Thank you for signing {$petition.title}.</p>
-
-<p>In order to <b>complete your signature</b>, we must confirm your e-mail.
-<br />
-Please do so by visiting the following web page by clicking
-on the link below or pasting the link into your browser.
-<br /><br />
-Email confirmation page: <a href="{$petition.confirmUrl} ">{$petition.confirmUrl}</a></p>
-
-<p>If you did not sign this petition, please ignore this message.</p>
+++ /dev/null
-Confirmation of signature needed for {$petition.title}
+++ /dev/null
-Thank you for signing {$petition.title}.
-
-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}
-
-If you did not sign this petition, please ignore this message.
+++ /dev/null
-<p>Thank you for signing {$petition.title}.</p>
-
-{include file="CRM/Campaign/Page/Petition/SocialNetwork.tpl" petition_id=$survey_id noscript=true email=true}
+++ /dev/null
-Thank you for signing {$petition.title}
\ No newline at end of file
+++ /dev/null
-Thank you for signing {$petition.title}.
$versionObject->setPostUpgradeMessage($postUpgradeMessage, $rev);
file_put_contents($postUpgradeMessageFile, $postUpgradeMessage);
}
- else {
- $postUpgradeMessage = file_get_contents($postUpgradeMessageFile);
- CRM_Upgrade_Incremental_Legacy::setPostUpgradeMessage($postUpgradeMessage, $rev);
- file_put_contents($postUpgradeMessageFile, $postUpgradeMessage);
- }
return TRUE;
}
$upgrade = new CRM_Upgrade_Form();
$template = CRM_Core_Smarty::singleton();
- if ((version_compare($currentVer, '3.3.alpha1') < 0 &&
- version_compare($latestVer, '3.3.alpha1') >= 0
- ) ||
- (version_compare($currentVer, '3.4.alpha1') < 0 &&
- version_compare($latestVer, '3.4.alpha1') >= 0
- )
- ) {
- $query = "
-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) {
- $preUpgradeMessage = ts("There are one or more Scheduled or In Progress mailings in your install. Scheduled mailings will not be sent and In Progress mailings will not finish if you continue with the upgrade. We strongly recommend that all Scheduled and In Progress mailings be completed or cancelled and then upgrade your CiviCRM install.");
- }
- }
-
- //turning some tables to monolingual during 3.4.beta3, CRM-7869
- $upgradeTo = str_replace('4.0.', '3.4.', $latestVer);
- $upgradeFrom = str_replace('4.0.', '3.4.', $currentVer);
-
// check for changed message templates
- self::checkMessageTemplate($template, $preUpgradeMessage, $upgradeTo, $upgradeFrom);
-
- $upgrade = new CRM_Upgrade_Form();
- if ($upgrade->multilingual &&
- version_compare($upgradeFrom, '3.4.beta3') == -1 &&
- version_compare($upgradeTo, '3.4.beta3') >= 0
- ) {
- $config = CRM_Core_Config::singleton();
- $preUpgradeMessage .= '<br />' . ts("As per <a href='%1'>the related blog post</a>, we are making contact names, addresses and mailings monolingual; the values entered for the default locale (%2) will be preserved and values for other locales removed.", array(
- 1 => 'http://civicrm.org/blogs/shot/multilingual-civicrm-3440-making-some-fields-monolingual',
- 2 => $config->lcMessages,
- ));
- }
-
- if (version_compare($currentVer, '3.4.6') == -1 &&
- version_compare($latestVer, '3.4.6') >= 0
- ) {
- $googleProcessorExists = CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_payment_processor WHERE payment_processor_type = 'Google_Checkout' AND is_active = 1 LIMIT 1;");
-
- if ($googleProcessorExists) {
- $preUpgradeMessage .= '<br />' . ts('To continue using Google Checkout Payment Processor with latest version of CiviCRM, requires updating merchant account settings. Please refer "Set API callback URL and other settings" section of <a href="%1" target="_blank"><strong>Google Checkout Configuration</strong></a> doc.', array(1 => 'http://wiki.civicrm.org/confluence/x/zAJTAg'));
- }
- }
+ self::checkMessageTemplate($template, $preUpgradeMessage, $latestVer, $currentVer);
// http://issues.civicrm.org/jira/browse/CRM-13572
// Depending on how the code was upgraded, some sites may still have copies of old
* @param $currentVer
*/
public static function checkMessageTemplate(&$template, &$message, $latestVer, $currentVer) {
- if (version_compare($currentVer, '3.1.alpha1') < 0) {
- return;
- }
$sql = "SELECT orig.workflow_id as workflow_id,
orig.msg_title as title
}
}
- /**
- * Compute any messages which should be displayed after upgrade.
- *
- * @param string $postUpgradeMessage
- * alterable.
- * @param string $rev
- * an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
- */
- public static function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
- if ($rev == '3.2.alpha1') {
- $postUpgradeMessage .= '<br />' . ts("We have reset the COUNTED flag to false for the event participant status 'Pending from incomplete transaction'. This change ensures that people who have a problem during registration can try again.");
- }
- if ($rev == '3.2.beta3') {
- $subTypes = CRM_Contact_BAO_ContactType::subTypes();
-
- if (is_array($subTypes) && !empty($subTypes)) {
- $config = CRM_Core_Config::singleton();
- $subTypeTemplates = array();
-
- if (isset($config->customTemplateDir)) {
- foreach ($subTypes as $key => $subTypeName) {
- $customContactSubTypeEdit = $config->customTemplateDir . "CRM/Contact/Form/Edit/" . $subTypeName . ".tpl";
- $customContactSubTypeView = $config->customTemplateDir . "CRM/Contact/Page/View/" . $subTypeName . ".tpl";
- if (file_exists($customContactSubTypeEdit) || file_exists($customContactSubTypeView)) {
- $subTypeTemplates[$subTypeName] = $subTypeName;
- }
- }
- }
-
- foreach ($subTypes as $key => $subTypeName) {
- $customContactSubTypeEdit = $config->templateDir . "CRM/Contact/Form/Edit/" . $subTypeName . ".tpl";
- $customContactSubTypeView = $config->templateDir . "CRM/Contact/Page/View/" . $subTypeName . ".tpl";
- if (file_exists($customContactSubTypeEdit) || file_exists($customContactSubTypeView)) {
- $subTypeTemplates[$subTypeName] = $subTypeName;
- }
- }
-
- if (!empty($subTypeTemplates)) {
- $subTypeTemplates = implode(',', $subTypeTemplates);
- $postUpgradeMessage .= '<br />' . ts('You are using custom template for contact subtypes: %1.', array(1 => $subTypeTemplates)) . '<br />' . ts('You need to move these subtype templates to the SubType directory in %1 and %2 respectively.', array(
- 1 => 'CRM/Contact/Form/Edit',
- 2 => 'CRM/Contact/Page/View',
- ));
- }
- }
- }
- if ($rev == '3.2.beta4') {
- $statuses = array('New', 'Current', 'Grace', 'Expired', 'Pending', 'Cancelled', 'Deceased');
- $sql = "
-SELECT count( id ) as statusCount
- FROM civicrm_membership_status
- WHERE name IN ( '" . implode("' , '", $statuses) . "' ) ";
- $count = CRM_Core_DAO::singleValueQuery($sql);
- if ($count < count($statuses)) {
- $postUpgradeMessage .= '<br />' . ts("One or more Membership Status Rules was disabled during the upgrade because it did not match a recognized status name. if custom membership status rules were added to this site - review the disabled statuses and re-enable any that are still needed (Administer > CiviMember > Membership Status Rules).");
- }
- }
- if ($rev == '3.4.alpha1') {
- $renamedBinScripts = array(
- 'ParticipantProcessor.php',
- 'RespondentProcessor.php',
- 'UpdateGreeting.php',
- 'UpdateMembershipRecord.php',
- 'UpdatePledgeRecord.php ',
- );
- $postUpgradeMessage .= '<br />' . ts('The following files have been renamed to have a ".php" extension instead of a ".php.txt" extension') . ': ' . implode(', ', $renamedBinScripts);
- }
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_2_2_alpha1($rev) {
- for ($stepID = 1; $stepID <= 4; $stepID++) {
- $formName = "CRM_Upgrade_TwoTwo_Form_Step{$stepID}";
- $form = new $formName();
-
- $error = NULL;
- if (!$form->verifyPreDBState($error)) {
- if (!isset($error)) {
- $error = "pre-condition failed for current upgrade step $stepID, rev $rev";
- }
- CRM_Core_Error::fatal($error);
- }
-
- if ($stepID == 4) {
- return;
- }
-
- $template = CRM_Core_Smarty::singleton();
-
- $eventFees = array();
- $query = "SELECT og.id ogid FROM civicrm_option_group og WHERE og.name LIKE %1";
- $params = array(1 => array('civicrm_event_page.amount%', 'String'));
- $dao = CRM_Core_DAO::executeQuery($query, $params);
- while ($dao->fetch()) {
- $eventFees[$dao->ogid] = $dao->ogid;
- }
- $template->assign('eventFees', $eventFees);
-
- $form->upgrade();
-
- if (!$form->verifyPostDBState($error)) {
- if (!isset($error)) {
- $error = "post-condition failed for current upgrade step $stepID, rev $rev";
- }
- CRM_Core_Error::fatal($error);
- }
- }
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_2_1_2($rev) {
- $formName = "CRM_Upgrade_TwoOne_Form_TwoOneTwo";
- $form = new $formName($rev);
-
- $error = NULL;
- if (!$form->verifyPreDBState($error)) {
- if (!isset($error)) {
- $error = "pre-condition failed for current upgrade for $rev";
- }
- CRM_Core_Error::fatal($error);
- }
-
- $form->upgrade();
-
- if (!$form->verifyPostDBState($error)) {
- if (!isset($error)) {
- $error = "post-condition failed for current upgrade for $rev";
- }
- CRM_Core_Error::fatal($error);
- }
- }
-
- /**
- * This function should check if if need to skip current sql file.
- * Name of this function will change according to the latest release
- */
- public static function upgrade_2_2_alpha3($rev) {
- // skip processing sql file, if fresh install -
- if (!CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'mail_protocol', 'id', 'name')) {
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
- return TRUE;
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_2_2_beta1($rev) {
- if (!CRM_Core_DAO::checkFieldExists('civicrm_pcp_block', 'notify_email')) {
- $template = CRM_Core_Smarty::singleton();
- $template->assign('notifyAbsent', TRUE);
- }
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_2_2_beta2($rev) {
- $template = CRM_Core_Smarty::singleton();
- if (!CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue',
- 'CRM_Contact_Form_Search_Custom_ZipCodeRange', 'id', 'name'
- )
- ) {
- $template->assign('customSearchAbsentAll', TRUE);
- }
- elseif (!CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue',
- 'CRM_Contact_Form_Search_Custom_MultipleValues', 'id', 'name'
- )
- ) {
- $template->assign('customSearchAbsent', TRUE);
- }
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_2_2_beta3($rev) {
- $template = CRM_Core_Smarty::singleton();
- if (!CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'custom_data_type', 'id', 'name')) {
- $template->assign('customDataType', TRUE);
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_3_0_alpha1($rev) {
-
- $threeZero = new CRM_Upgrade_ThreeZero_ThreeZero();
-
- $error = NULL;
- if (!$threeZero->verifyPreDBState($error)) {
- if (!isset($error)) {
- $error = 'pre-condition failed for current upgrade for 3.0.alpha2';
- }
- CRM_Core_Error::fatal($error);
- }
-
- $threeZero->upgrade($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_3_1_alpha1($rev) {
-
- $threeOne = new CRM_Upgrade_ThreeOne_ThreeOne();
-
- $error = NULL;
- if (!$threeOne->verifyPreDBState($error)) {
- if (!isset($error)) {
- $error = 'pre-condition failed for current upgrade for 3.0.alpha2';
- }
- CRM_Core_Error::fatal($error);
- }
-
- $threeOne->upgrade($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_2_2_7($rev) {
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- $sql = "UPDATE civicrm_report_instance
- SET form_values = REPLACE(form_values,'#',';') ";
- CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
-
- // make report component enabled by default
- $domain = new CRM_Core_DAO_Domain();
- $domain->selectAdd();
- $domain->selectAdd('config_backend');
- $domain->find(TRUE);
- if ($domain->config_backend) {
- $defaults = unserialize($domain->config_backend);
-
- if (is_array($defaults['enableComponents'])) {
- $compId = CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_component WHERE name = 'CiviReport'");
- if ($compId) {
- $defaults['enableComponents'][] = 'CiviReport';
- $defaults['enableComponentIDs'][] = $compId;
-
- CRM_Core_BAO_ConfigSetting::add($defaults);
- }
- }
- }
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_3_0_2($rev) {
-
- $template = CRM_Core_Smarty::singleton();
- //check whether upgraded from 2.1.x or 2.2.x
- $inboundEmailID = CRM_Core_OptionGroup::getValue('activity_type', 'Inbound Email', 'name');
-
- if (!empty($inboundEmailID)) {
- $template->assign('addInboundEmail', FALSE);
- }
- else {
- $template->assign('addInboundEmail', TRUE);
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_3_0_4($rev) {
- //make sure 'Deceased' membership status present in db,CRM-5636
- $template = CRM_Core_Smarty::singleton();
-
- $addDeceasedStatus = FALSE;
- $sql = "SELECT max(id) FROM civicrm_membership_status where name = 'Deceased'";
- if (!CRM_Core_DAO::singleValueQuery($sql)) {
- $addDeceasedStatus = TRUE;
- }
- $template->assign('addDeceasedStatus', $addDeceasedStatus);
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_3_1_0($rev) {
- // upgrade all roles who have 'access CiviEvent' permission, to also have
- // newly added permission 'edit_all_events', CRM-5472
- $config = CRM_Core_Config::singleton();
- if (is_callable(array(
- $config->userSystem,
- 'replacePermission',
- ))) {
- $config->userSystem->replacePermission('access CiviEvent', array('access CiviEvent', 'edit all events'));
- }
-
- //make sure 'Deceased' membership status present in db,CRM-5636
- $template = CRM_Core_Smarty::singleton();
-
- $addDeceasedStatus = FALSE;
- $sql = "SELECT max(id) FROM civicrm_membership_status where name = 'Deceased'";
- if (!CRM_Core_DAO::singleValueQuery($sql)) {
- $addDeceasedStatus = TRUE;
- }
- $template->assign('addDeceasedStatus', $addDeceasedStatus);
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_3_1_3($rev) {
- $threeOne = new CRM_Upgrade_ThreeOne_ThreeOne();
- $threeOne->upgrade_3_1_3();
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * Perform an incremental upgrade.
- *
- * @param string $rev
- * the revision to which we are upgrading (Note: When processing a series of upgrades, this is the immediate upgrade - not the final).
- */
- public static function upgrade_3_1_4($rev) {
- $threeOne = new CRM_Upgrade_ThreeOne_ThreeOne();
- $threeOne->upgrade_3_1_4();
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
}
+++ /dev/null
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
- */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
- */
-class CRM_Upgrade_Incremental_php_FourZero {
- /**
- * @param $errors
- *
- * @return bool
- */
- public function verifyPreDBstate(&$errors) {
- return TRUE;
- }
-
- /**
- * @param $rev
- */
- public function upgrade_4_0_alpha1($rev) {
- // do nothing, db is already upgraded to 3.4.alpha1.
- }
-
-}
+++ /dev/null
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
- */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
- */
-class CRM_Upgrade_Incremental_php_ThreeFour {
- /**
- * @param $errors
- *
- * @return bool
- */
- public function verifyPreDBstate(&$errors) {
- return TRUE;
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_4_alpha3($rev) {
- // CRM-7681, update report instance criteria.
- $modifiedReportIds = array(
- 'contact/summary',
- 'contact/detail',
- 'event/participantListing',
- 'member/summary',
- 'pledge/summary',
- 'pledge/pbnp',
- 'member/detail',
- 'member/lapse',
- 'grant/detail',
- 'contribute/bookkeeping',
- 'contribute/lybunt',
- 'contribute/summary',
- 'contribute/repeat',
- 'contribute/detail',
- 'contribute/organizationSummary',
- 'contribute/sybunt',
- 'contribute/householdSummary',
- 'contact/relationship',
- 'contact/currentEmployer',
- 'case/demographics',
- 'walklist',
- 'case/detail',
- 'contact/log',
- 'activitySummary',
- 'case/timespent',
- 'case/summary',
- );
-
- $instances = CRM_Core_DAO::executeQuery("SELECT id, form_values, report_id FROM civicrm_report_instance WHERE report_id IN ('" . implode("','", $modifiedReportIds) . "')");
-
- while ($instances->fetch()) {
- $formValues = unserialize($instances->form_values);
-
- // replace display_name fields by sort_name
- if (!empty($formValues['fields']) && isset($formValues['fields']['display_name'])) {
- $formValues['fields']['sort_name'] = $formValues['fields']['display_name'];
- unset($formValues['fields']['display_name']);
- }
-
- // replace display_name filters by sort_name
- if (isset($formValues['display_name_op'])) {
- $formValues['sort_name_op'] = $formValues['display_name_op'];
- unset($formValues['display_name_op']);
- }
- if (isset($formValues['display_name_value'])) {
- $formValues['sort_name_value'] = $formValues['display_name_value'];
- unset($formValues['display_name_value']);
- }
-
- // for report id 'contact/log' replace field
- // display_name_touched by sort_name_touched
- if ($instances->report_id == 'contact/log' && isset($formValues['fields']['display_name_touched'])) {
- $formValues['fields']['sort_name_touched'] = $formValues['fields']['display_name_touched'];
- unset($formValues['fields']['display_name_touched']);
- }
-
- // for report id 'contact/relationship' replace field
- // display_name_a by sort_name_a and display_name_b by sort_name_b
- if ($instances->report_id == 'contact/relationship') {
- if (isset($formValues['fields']['display_name_a'])) {
- $formValues['fields']['sort_name_a'] = $formValues['fields']['display_name_a'];
- unset($formValues['fields']['display_name_a']);
- }
-
- if (isset($formValues['fields']['display_name_b'])) {
- $formValues['fields']['sort_name_b'] = $formValues['fields']['display_name_b'];
- unset($formValues['fields']['display_name_b']);
- }
- }
-
- // save updated instance criteria
- $dao = new CRM_Report_DAO_ReportInstance();
- $dao->id = $instances->id;
- $dao->form_values = serialize($formValues);
- $dao->save();
- $dao->free();
- }
-
- // Handled for typo in 3.3.2.mysql.tpl, rename column visibilty to
- // visibility in table civicrm_mailing
- $renameColumnVisibility = CRM_Core_DAO::checkFieldExists('civicrm_mailing', 'visibilty');
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->assign('renameColumnVisibility', $renameColumnVisibility);
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_4_beta2($rev) {
- $addPetitionOptionGroup = !(boolean) CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'msg_tpl_workflow_petition', 'id', 'name');
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->assign('addPetitionOptionGroup', $addPetitionOptionGroup);
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_4_beta3($rev) {
- // do the regular upgrade
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
-
- if ($upgrade->multilingual) {
-
- // rebuild schema, because due to a CRM-7854 mis-fix some indices might be missing
- CRM_Core_I18n_Schema::rebuildMultilingualSchema($upgrade->locales, $rev);
-
- // turn a set of columns singlelingual
- $config = CRM_Core_Config::singleton();
- $tables = array('civicrm_address', 'civicrm_contact', 'civicrm_mailing', 'civicrm_mailing_component');
- $triggers = array(array('when' => '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";
- foreach ($tables as $table) {
- CRM_Core_I18n_Schema::makeSinglelingualTable($config->lcMessages, $table, 'CRM_Core_I18n_SchemaStructure_3_4_beta2', $triggers);
- }
- }
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_4_3($rev) {
- // CRM-8147, update group_type for uf groups, check and add component field types
- $ufGroups = new CRM_Core_DAO_UFGroup();
- $ufGroups->find();
- $skipGroupTypes = array(
- 'Individual,Contact',
- 'Organization,Contact',
- 'Household,Contact',
- 'Contact',
- 'Individual',
- 'Organization',
- 'Household',
- );
- while ($ufGroups->fetch()) {
- if (!in_array($ufGroups->group_type, $skipGroupTypes)) {
- $groupTypes = CRM_Core_BAO_UFGroup::calculateGroupType($ufGroups->id, TRUE);
- CRM_Core_BAO_UFGroup::updateGroupTypes($ufGroups->id, $groupTypes);
- }
- }
- $ufGroups->free();
-
- // CRM-8134 add phone_ext column if it wasn't already added for this site in 3.3.7 upgrade (3.3.7 was released after 3.4.0)
- $dao = new CRM_Contact_DAO_Contact();
- $dbName = $dao->_database;
-
- $chkExtQuery = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %1
- AND TABLE_NAME = 'civicrm_phone' AND COLUMN_NAME = 'phone_ext'";
- $extensionExists = CRM_Core_DAO::singleValueQuery($chkExtQuery,
- array(1 => array($dbName, 'String')),
- TRUE, FALSE
- );
-
- if (!$extensionExists) {
- $colQuery = 'ALTER TABLE `civicrm_phone` ADD `phone_ext` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `phone` ';
- CRM_Core_DAO::executeQuery($colQuery);
- }
-
- $sql = "SELECT id FROM civicrm_location_type WHERE name = 'Main'";
- if (!CRM_Core_DAO::singleValueQuery($sql)) {
- $query = "
-INSERT INTO civicrm_location_type ( name, description, is_reserved, is_active )
- VALUES ( 'Main', 'Main office location', 0, 1 );";
- CRM_Core_DAO::executeQuery($query);
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_4_4($rev) {
- // CRM-8315, update report instance criteria.
- $modifiedReportIds = array('member/summary', 'member/detail');
-
- $instances = CRM_Core_DAO::executeQuery("SELECT id, form_values, report_id FROM civicrm_report_instance WHERE report_id IN ('" . implode("','", $modifiedReportIds) . "')");
-
- while ($instances->fetch()) {
- $formValues = unserialize($instances->form_values);
-
- // replace display_name fields by sort_name
- if (!isset($formValues['membership_start_date_relative']) &&
- !isset($formValues['membership_end_date_relative'])
- ) {
- $formValues['membership_start_date_relative'] = '0';
- $formValues['membership_start_date_from'] = '';
- $formValues['membership_start_date_to'] = '';
- $formValues['membership_end_date_relative'] = '0';
- $formValues['membership_end_date_from'] = '';
- $formValues['membership_end_date_to'] = '';
- }
-
- // save updated instance criteria
- $dao = new CRM_Report_DAO_ReportInstance();
- $dao->id = $instances->id;
- $dao->form_values = serialize($formValues);
- $dao->save();
- $dao->free();
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_4_5($rev) {
- // handle db changes done for CRM-8218
- $alterContactDashboard = FALSE;
- $dao = new CRM_Contact_DAO_DashboardContact();
- $dbName = $dao->_database;
-
- $chkContentQuery = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %1
- AND TABLE_NAME = 'civicrm_dashboard_contact' AND COLUMN_NAME = 'content'";
- $contentExists = CRM_Core_DAO::singleValueQuery($chkContentQuery,
- array(1 => array($dbName, 'String')),
- TRUE, FALSE
- );
- if (!$contentExists) {
- $alterContactDashboard = TRUE;
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->assign('alterContactDashboard', $alterContactDashboard);
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_4_6($rev) {
- $modifiedReportIds = array('event/summary', 'activity', 'Mailing/bounce', 'Mailing/clicks', 'Mailing/opened');
-
- $instances = CRM_Core_DAO::executeQuery("SELECT id, form_values, report_id FROM civicrm_report_instance WHERE report_id IN ('" . implode("','", $modifiedReportIds) . "')");
- while ($instances->fetch()) {
- $formValues = unserialize($instances->form_values);
-
- switch ($instances->report_id) {
- case 'event/summary':
- $eventDates = array(
- 'event_start_date_from',
- 'event_start_date_to',
- 'event_end_date_from',
- 'event_end_date_to',
- );
- foreach ($eventDates as $date) {
- if (isset($formValues[$date]) && $formValues[$date] == ' ') {
- $formValues[$date] = '';
- }
- }
- break;
-
- case 'activity':
- if (isset($formValues['group_bys'])) {
- if (is_array($formValues['group_bys'])) {
- $orderBy = array();
- $count = 0;
- foreach ($formValues['group_bys'] as $col => $isSet) {
- if (!$isSet) {
- continue;
- }
-
- $orderBy[++$count] = array(
- 'column' => $col,
- 'order' => 'ASC',
- );
- }
- if (!empty($orderBy)) {
- $formValues['order_bys'] = $orderBy;
- }
- }
- unset($formValues['group_bys']);
- }
- break;
-
- case 'Mailing/bounce':
- case 'Mailing/clicks':
- case 'Mailing/opened':
- $formValues['fields']['mailing_name'] = 1;
- break;
- }
-
- // save updated instance criteria
- $dao = new CRM_Report_DAO_ReportInstance();
- $dao->id = $instances->id;
- $dao->form_values = serialize($formValues);
- $dao->save();
- $dao->free();
- }
-
- $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
- AND v.name = %2",
- array(
- 1 => array('activity_type', 'String'),
- 2 => array('Bulk Email', 'String'),
- ));
-
- // CRM-8852, reset contact field cache
- CRM_Core_BAO_Cache::deleteGroup('contact fields');
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->assign('bulkEmailActivityType', $bulkEmailActivityType);
-
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- *
- * @throws Exception
- */
- public function upgrade_3_4_7($rev) {
- $onBehalfProfileId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', 'on_behalf_organization', 'id', 'name');
- if (!$onBehalfProfileId) {
- CRM_Core_Error::fatal();
- }
-
- $pages = CRM_Core_DAO::executeQuery("
-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
-AND civicrm_uf_join.id IS NULL
-");
-
- while ($pages->fetch()) {
- $query = "
-INSERT INTO civicrm_uf_join
- (is_active, module, entity_table, entity_id, weight, uf_group_id)
-VALUES
- (1, 'OnBehalf', 'civicrm_contribution_page', %1, 1, %2)";
-
- $params = array(
- 1 => array($pages->id, 'Integer'),
- 2 => array($onBehalfProfileId, 'Integer'),
- );
- CRM_Core_DAO::executeQuery($query, $params);
- }
-
- // CRM-8774
- $config = CRM_Core_Config::singleton();
- if ($config->userFramework == 'Drupal' || $config->userFramework == 'Drupal6') {
- db_query("UPDATE {system} SET weight = 100 WHERE name = 'civicrm'");
- drupal_flush_all_caches();
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
-}
+++ /dev/null
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
- */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
- */
-class CRM_Upgrade_Incremental_php_ThreeThree {
- /**
- * @param $errors
- *
- * @return bool
- */
- public function verifyPreDBstate(&$errors) {
- return TRUE;
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_3_alpha1($rev) {
- $config = CRM_Core_Config::singleton();
- if ($config->userSystem->is_drupal) {
- // CRM-6426 - make civicrm profiles permissioned on drupal my account
- $config->userSystem->updateCategories();
- }
-
- // CRM-6846
- // insert name column for custom field table.
- // make sure name for custom field, group and
- // profile should be unique and properly munged.
- $colQuery = 'ALTER TABLE `civicrm_custom_field` ADD `name` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `custom_group_id` ';
- CRM_Core_DAO::executeQuery($colQuery, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
-
- $customFldCntQuery = 'select count(*) from civicrm_custom_field where name like %1 and id != %2';
- $customField = new CRM_Core_DAO_CustomField();
- $customField->selectAdd();
- $customField->selectAdd('id, label');
- $customField->find();
- while ($customField->fetch()) {
- $name = CRM_Utils_String::munge($customField->label, '_', 64);
- $fldCnt = CRM_Core_DAO::singleValueQuery($customFldCntQuery,
- array(
- 1 => array($name, 'String'),
- 2 => array($customField->id, 'Integer'),
- ), TRUE, FALSE
- );
- if ($fldCnt) {
- $name = CRM_Utils_String::munge("{$name}_" . rand(), '_', 64);
- }
- $customFieldQuery = "
-Update `civicrm_custom_field`
-SET `name` = %1
-WHERE id = %2
-";
- $customFieldParams = array(
- 1 => array($name, 'String'),
- 2 => array($customField->id, 'Integer'),
- );
- CRM_Core_DAO::executeQuery($customFieldQuery, $customFieldParams, TRUE, NULL, FALSE, FALSE);
- }
- $customField->free();
-
- $customGrpCntQuery = 'select count(*) from civicrm_custom_group where name like %1 and id != %2';
- $customGroup = new CRM_Core_DAO_CustomGroup();
- $customGroup->selectAdd();
- $customGroup->selectAdd('id, title');
- $customGroup->find();
- while ($customGroup->fetch()) {
- $name = CRM_Utils_String::munge($customGroup->title, '_', 64);
- $grpCnt = CRM_Core_DAO::singleValueQuery($customGrpCntQuery,
- array(
- 1 => array($name, 'String'),
- 2 => array($customGroup->id, 'Integer'),
- )
- );
- if ($grpCnt) {
- $name = CRM_Utils_String::munge("{$name}_" . rand(), '_', 64);
- }
- CRM_Core_DAO::setFieldValue('CRM_Core_DAO_CustomGroup', $customGroup->id, 'name', $name);
- }
- $customGroup->free();
-
- $ufGrpCntQuery = 'select count(*) from civicrm_uf_group where name like %1 and id != %2';
- $ufGroup = new CRM_Core_DAO_UFGroup();
- $ufGroup->selectAdd();
- $ufGroup->selectAdd('id, title');
- $ufGroup->find();
- while ($ufGroup->fetch()) {
- $name = CRM_Utils_String::munge($ufGroup->title, '_', 64);
- $ufGrpCnt = CRM_Core_DAO::singleValueQuery($ufGrpCntQuery,
- array(
- 1 => array($name, 'String'),
- 2 => array($ufGroup->id, 'Integer'),
- )
- );
- if ($ufGrpCnt) {
- $name = CRM_Utils_String::munge("{$name}_" . rand(), '_', 64);
- }
- CRM_Core_DAO::setFieldValue('CRM_Core_DAO_UFGroup', $ufGroup->id, 'name', $name);
- }
- $ufGroup->free();
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
-
- // now modify the config so that the directories are stored in option group/value
- // CRM-6914
- // require_once 'CRM/Core/BAO/ConfigSetting.php';
- // $params = array( );
- // CRM_Core_BAO_ConfigSetting::add( $parambs );
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_3_beta1($rev) {
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
-
- // CRM-6902
- // Add column price_field_value_id in civicrm_line_item.
- // Do not drop option_group_id column now since we need it to
- // update line items.
- $updateLineItem1 = "ALTER TABLE civicrm_line_item ADD COLUMN price_field_value_id int(10) unsigned default NULL;";
- CRM_Core_DAO::executeQuery($updateLineItem1);
-
- $priceFieldDAO = new CRM_Price_DAO_PriceField();
- $priceFieldDAO->find();
- $ids = array();
- while ($priceFieldDAO->fetch()) {
-
- $opGroupDAO = new CRM_Core_DAO_OptionGroup();
- $opGroupDAO->name = 'civicrm_price_field.amount.' . $priceFieldDAO->id;
-
- if (!$opGroupDAO->find(TRUE)) {
- $opGroupDAO->free();
- continue;
- }
-
- $opValueDAO = new CRM_Core_DAO_OptionValue();
- $opValueDAO->option_group_id = $opGroupDAO->id;
- $opValueDAO->find();
-
- while ($opValueDAO->fetch()) {
- // FIX ME: not migrating description(?), there will
- // be a field description for each option.
- $fieldValue = array(
- 'price_field_id' => $priceFieldDAO->id,
- 'label' => $opValueDAO->label,
- 'name' => CRM_Utils_String::munge($opValueDAO->label, '_', 64),
- 'amount' => $opValueDAO->name,
- 'weight' => $opValueDAO->weight,
- 'is_default' => $opValueDAO->is_default,
- 'is_active' => $opValueDAO->is_active,
- );
-
- if ($priceFieldDAO->count) {
- // Migrate Participant Counts on option level.
- // count of each option will be the same
- // as earlier field count.
- $fieldValue['count'] = $priceFieldDAO->count;
- }
-
- $fieldValueDAO = CRM_Price_BAO_PriceFieldValue::add($fieldValue, $ids);
-
- $lineItemDAO = new CRM_Price_DAO_LineItem();
- $lineItemDAO->option_group_id = $opGroupDAO->id;
- $lineItemDAO->label = $opValueDAO->label;
- $lineItemDAO->unit_price = $opValueDAO->name;
-
- $labelFound = $priceFound = FALSE;
-
- // check with label and amount
- if (!$lineItemDAO->find(TRUE)) {
- $lineItemDAO->free();
- $lineItemDAO = new CRM_Price_DAO_LineItem();
- $lineItemDAO->option_group_id = $opGroupDAO->id;
- $lineItemDAO->label = $opValueDAO->label;
-
- // check with label only
- if ($lineItemDAO->find(TRUE)) {
- $labelFound = TRUE;
- }
- }
- else {
- $labelFound = TRUE;
- $priceFound = TRUE;
- }
-
- $lineItemDAO->free();
-
- // update civicrm_line_item for price_field_value_id.
- // Used query to avoid line by line update.
- if ($labelFound || $priceFound) {
- $lineItemParams = array(
- 1 => array($fieldValueDAO->id, 'Integer'),
- 2 => array($opValueDAO->label, 'String'),
- );
- $updateLineItems = "UPDATE civicrm_line_item SET price_field_value_id = %1 WHERE label = %2";
- if ($priceFound) {
- $lineItemParams[3] = array($opValueDAO->name, 'Float');
- $updateLineItems .= " AND unit_price = %3";
- }
- CRM_Core_DAO::executeQuery($updateLineItems, $lineItemParams);
- }
- }
-
- $opGroupDAO->delete();
- $opValueDAO->free();
- $opGroupDAO->free();
- }
-
- $priceFieldDAO->free();
-
- // Now drop option_group_id column from civicrm_line_item
- $updateLineItem2 = "ALTER TABLE civicrm_line_item DROP option_group_id,
- ADD CONSTRAINT `FK_civicrm_price_field_value_id` FOREIGN KEY (price_field_value_id) REFERENCES civicrm_price_field_value(id) ON DELETE SET NULL;";
- CRM_Core_DAO::executeQuery($updateLineItem2, array(), TRUE, NULL, FALSE, FALSE);
-
- $updatePriceField = "ALTER TABLE civicrm_price_field DROP count";
- CRM_Core_DAO::executeQuery($updatePriceField, array(), TRUE, NULL, FALSE, FALSE);
-
- // as the table 'civicrm_price_field' is localised and column 'count' is dropped
- // after the views are rebuild, we need to rebuild views to avoid invalid reference of table.
- if ($upgrade->multilingual) {
- CRM_Core_I18n_Schema::rebuildMultilingualSchema($upgrade->locales, $rev);
- }
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_3_beta3($rev) {
- // get the duplicate Ids of line item entries
- $dupeLineItemIds = array();
- $fields = array('entity_table', 'entity_id', 'price_field_id', 'price_field_value_id');
- $mainLineItem = new CRM_Price_BAO_LineItem();
- $mainLineItem->find(TRUE);
- while ($mainLineItem->fetch()) {
- $dupeLineItem = new CRM_Price_BAO_LineItem();
- foreach ($fields as $fld) {
- $dupeLineItem->$fld = $mainLineItem->$fld;
- }
- $dupeLineItem->find(TRUE);
- $dupeLineItem->addWhere("id != $mainLineItem->id");
- while ($dupeLineItem->fetch()) {
- $dupeLineItemIds[$dupeLineItem->id] = $dupeLineItem->id;
- }
- $dupeLineItem->free();
- }
- $mainLineItem->free();
-
- //clean line item table.
- if (!empty($dupeLineItemIds)) {
- $sql = 'DELETE FROM civicrm_line_item WHERE id IN ( ' . implode(', ', $dupeLineItemIds) . ' )';
- CRM_Core_DAO::executeQuery($sql);
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_3_0($rev) {
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
-
- //CRM-7123 -lets activate needful languages.
- $config = CRM_Core_Config::singleton();
- $locales = array();
- if (is_dir($config->gettextResourceDir) && $dir = opendir($config->gettextResourceDir)) {
- while ($filename = readdir($dir)) {
- if (preg_match('/^[a-z][a-z]_[A-Z][A-Z]$/', $filename)) {
- $locales[$filename] = $filename;
- }
- }
- closedir($dir);
- }
-
- if (isset($config->languageLimit) && !empty($config->languageLimit)) {
- //get all already enabled and all l10n languages.
- $locales = array_merge(array_values($locales), array_keys($config->languageLimit));
- }
-
- if (!empty($locales)) {
- $sql = '
- UPDATE civicrm_option_value val
-INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id )
- SET val.is_active = 1
- WHERE grp.name = %1
- AND val.name IN ( ' . "'" . implode("', '", $locales) . "' )";
-
- CRM_Core_DAO::executeQuery($sql,
- array(1 => array('languages', 'String')),
- TRUE, NULL, FALSE, FALSE
- );
- }
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_3_2($rev) {
- $dropMailingIndex = FALSE;
- $indexes = CRM_Core_DAO::executeQuery('SHOW INDEXES FROM civicrm_mailing_job');
- while ($indexes->fetch()) {
- if ($indexes->Key_name == 'parent_id') {
- $dropMailingIndex = TRUE;
- break;
- }
- }
- //CRM-7137
- // get membership type for each membership block.
- $sql = "SELECT id, membership_types FROM civicrm_membership_block ";
- $dao = CRM_Core_DAO::executeQuery($sql);
- while ($dao->fetch()) {
- $memType = explode(',', $dao->membership_types);
-
- $memTypeSerialize = array();
- foreach ($memType as $k => $v) {
- $memTypeSerialize[$v] = 0;
- }
-
- // save membership type as an serialized array along w/ auto_renew defalt value zero.
- $memBlock = new CRM_Member_DAO_MembershipBlock();
- $memBlock->id = $dao->id;
- $memBlock->membership_types = serialize($memTypeSerialize);
- $memBlock->save();
- }
-
- //CRM-7172
- if (CRM_Mailing_Info::workflowEnabled()) {
- $config = CRM_Core_Config::singleton();
- if (is_callable(array(
- $config->userSystem,
- 'replacePermission',
- ))) {
- $config->userSystem->replacePermission('access CiviMail', array(
- 'access CiviMail',
- 'create mailings',
- 'approve mailings',
- 'schedule mailings',
- ));
- }
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->assign('dropMailingIndex', $dropMailingIndex);
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_3_7($rev) {
- $dao = new CRM_Contact_DAO_Contact();
- $dbName = $dao->_database;
-
- $chkExtQuery = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %1
- AND TABLE_NAME = 'civicrm_phone' AND COLUMN_NAME = 'phone_ext'";
- $extensionExists = CRM_Core_DAO::singleValueQuery($chkExtQuery,
- array(1 => array($dbName, 'String')),
- TRUE, FALSE
- );
-
- if (!$extensionExists) {
- $colQuery = 'ALTER TABLE `civicrm_phone` ADD `phone_ext` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `phone` ';
- CRM_Core_DAO::executeQuery($colQuery);
- }
-
- // handle db changes done for CRM-8218
- $alterContactDashboard = FALSE;
- $dao = new CRM_Contact_DAO_DashboardContact();
- $dbName = $dao->_database;
-
- $chkContentQuery = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %1
- AND TABLE_NAME = 'civicrm_dashboard_contact' AND COLUMN_NAME = 'content'";
- $contentExists = CRM_Core_DAO::singleValueQuery($chkContentQuery,
- array(1 => array($dbName, 'String')),
- TRUE, FALSE
- );
- if (!$contentExists) {
- $alterContactDashboard = TRUE;
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->assign('alterContactDashboard', $alterContactDashboard);
- $upgrade->processSQL($rev);
- }
-
-}
+++ /dev/null
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
- */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
- */
-class CRM_Upgrade_Incremental_php_ThreeTwo {
- /**
- * @param $errors
- *
- * @return bool
- */
- public function verifyPreDBstate(&$errors) {
- return TRUE;
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_2_alpha1($rev) {
- //CRM-5666 -if user already have 'access CiviCase'
- //give all new permissions and drop access CiviCase.
- $config = CRM_Core_Config::singleton();
- if ($config->userSystem->is_drupal) {
-
- $config->userSystem->replacePermission('access CiviCase', array(
- 'access my cases and activities',
- 'access all cases and activities',
- 'administer CiviCase',
- ));
-
- //insert core acls.
- $casePermissions = array(
- 'delete in CiviCase',
- 'administer CiviCase',
- 'access my cases and activities',
- 'access all cases and activities',
- );
- $aclParams = array(
- 'name' => 'Core ACL',
- 'deny' => 0,
- 'acl_id' => NULL,
- 'object_id' => NULL,
- 'acl_table' => NULL,
- 'entity_id' => 1,
- 'operation' => 'All',
- 'is_active' => 1,
- 'entity_table' => 'civicrm_acl_role',
- );
- foreach ($casePermissions as $per) {
- $aclParams['object_table'] = $per;
- $acl = new CRM_ACL_DAO_ACL();
- $acl->object_table = $per;
- if (!$acl->find(TRUE)) {
- $acl->copyValues($aclParams);
- $acl->save();
- }
- }
- //drop 'access CiviCase' acl
- CRM_Core_DAO::executeQuery("DELETE FROM civicrm_acl WHERE object_table = 'access CiviCase'");
- }
-
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->processSQL($rev);
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_2_beta4($rev) {
- $upgrade = new CRM_Upgrade_Form();
-
- $config = CRM_Core_Config::singleton();
- $seedLocale = $config->lcMessages;
-
- //handle missing civicrm_uf_field.help_pre
- $hasLocalizedPreHelpCols = FALSE;
-
- // CRM-6451: for multilingual sites we need to find the optimal
- // locale to use as the final civicrm_membership_status.name column
- $domain = new CRM_Core_DAO_Domain();
- $domain->find(TRUE);
- $locales = array();
- if ($domain->locales) {
- $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
- // optimal: an English locale
- foreach (array(
- 'en_US',
- 'en_GB',
- 'en_AU',
- ) as $loc) {
- if (in_array($loc, $locales)) {
- $seedLocale = $loc;
- break;
- }
- }
-
- // if no English and no $config->lcMessages: use the first available
- if (!$seedLocale) {
- $seedLocale = $locales[0];
- }
-
- $upgrade->assign('seedLocale', $seedLocale);
- $upgrade->assign('locales', $locales);
-
- $localizedColNames = array();
- foreach ($locales as $loc) {
- $localizedName = "help_pre_{$loc}";
- $localizedColNames[$localizedName] = $localizedName;
- }
- $columns = CRM_Core_DAO::executeQuery('SHOW COLUMNS FROM civicrm_uf_field');
- while ($columns->fetch()) {
- if (strpos($columns->Field, 'help_pre') !== FALSE &&
- in_array($columns->Field, $localizedColNames)
- ) {
- $hasLocalizedPreHelpCols = TRUE;
- break;
- }
- }
- }
- $upgrade->assign('hasLocalizedPreHelpCols', $hasLocalizedPreHelpCols);
-
- $upgrade->processSQL($rev);
-
- // now civicrm_membership_status.name has possibly localised strings, so fix them
- $i18n = new CRM_Core_I18n($seedLocale);
- $statuses = array(
- array(
- 'name' => 'New',
- 'start_event' => 'join_date',
- 'end_event' => 'join_date',
- 'end_event_adjust_unit' => 'month',
- 'end_event_adjust_interval' => '3',
- 'is_current_member' => '1',
- 'is_admin' => '0',
- 'is_default' => '0',
- 'is_reserved' => '0',
- ),
- array(
- 'name' => 'Current',
- 'start_event' => 'start_date',
- 'end_event' => 'end_date',
- 'is_current_member' => '1',
- 'is_admin' => '0',
- 'is_default' => '1',
- 'is_reserved' => '0',
- ),
- array(
- 'name' => 'Grace',
- 'start_event' => 'end_date',
- 'end_event' => 'end_date',
- 'end_event_adjust_unit' => 'month',
- 'end_event_adjust_interval' => '1',
- 'is_current_member' => '1',
- 'is_admin' => '0',
- 'is_default' => '0',
- 'is_reserved' => '0',
- ),
- array(
- 'name' => 'Expired',
- 'start_event' => 'end_date',
- 'start_event_adjust_unit' => 'month',
- 'start_event_adjust_interval' => '1',
- 'is_current_member' => '0',
- 'is_admin' => '0',
- 'is_default' => '0',
- 'is_reserved' => '0',
- ),
- array(
- 'name' => 'Pending',
- 'start_event' => 'join_date',
- 'end_event' => 'join_date',
- 'is_current_member' => '0',
- 'is_admin' => '0',
- 'is_default' => '0',
- 'is_reserved' => '1',
- ),
- array(
- 'name' => 'Cancelled',
- 'start_event' => 'join_date',
- 'end_event' => 'join_date',
- 'is_current_member' => '0',
- 'is_admin' => '0',
- 'is_default' => '0',
- 'is_reserved' => '0',
- ),
- array(
- 'name' => 'Deceased',
- 'is_current_member' => '0',
- 'is_admin' => '1',
- 'is_default' => '0',
- 'is_reserved' => '1',
- ),
- );
-
- $statusIds = array();
- $insertedNewRecord = FALSE;
- foreach ($statuses as $status) {
- $dao = new CRM_Member_DAO_MembershipStatus();
-
- // try to find an existing English status
- $dao->name = $status['name'];
-
- // // if not found, look for translated status name
- // if (!$dao->find(true)) {
- // $found = false;
- // $dao->name = $i18n->translate($status['name']);
- // }
-
- // if found, update name and is_reserved
- if ($dao->find(TRUE)) {
- $dao->name = $status['name'];
- $dao->is_reserved = $status['is_reserved'];
- if ($status['is_reserved']) {
- $dao->is_active = 1;
- }
- // if not found, prepare a new row for insertion
- }
- else {
- $insertedNewRecord = TRUE;
- foreach ($status as $property => $value) {
- $dao->$property = $value;
- }
- $dao->weight = CRM_Utils_Weight::getDefaultWeight('CRM_Member_DAO_MembershipStatus');
- }
-
- // add label (translated name) and save (UPDATE or INSERT)
- $dao->label = $i18n->translate($status['name']);
- $dao->save();
-
- $statusIds[$dao->id] = $dao->id;
- }
-
- //disable all status those are customs.
- if ($insertedNewRecord) {
- $sql = '
-UPDATE civicrm_membership_status
- SET is_active = 0
- WHERE id NOT IN ( ' . implode(',', $statusIds) . ' )';
- CRM_Core_DAO::executeQuery($sql);
- }
- }
-
- /**
- * @param $rev
- */
- public function upgrade_3_2_1($rev) {
- //CRM-6565 check if Activity Index is already exists or not.
- $addActivityTypeIndex = TRUE;
- $indexes = CRM_Core_DAO::executeQuery('SHOW INDEXES FROM civicrm_activity');
- while ($indexes->fetch()) {
- if ($indexes->Key_name == 'UI_activity_type_id') {
- $addActivityTypeIndex = FALSE;
- }
- }
- // CRM-6563: restrict access to the upload dir, tighten access to the config-and-log dir
- $config = CRM_Core_Config::singleton();
- CRM_Utils_File::restrictAccess($config->uploadDir);
- CRM_Utils_File::restrictAccess($config->configAndLogDir);
- $upgrade = new CRM_Upgrade_Form();
- $upgrade->assign('addActivityTypeIndex', $addActivityTypeIndex);
- $upgrade->processSQL($rev);
- }
-
-}
+++ /dev/null
--- CRM-6421
-ALTER TABLE civicrm_mapping_field
-MODIFY name varchar(255) COMMENT 'Mapping field key';
\ No newline at end of file
+++ /dev/null
--- CRM-6554
-SELECT @domainID := min(id) FROM civicrm_domain;
-SELECT @navid := id FROM civicrm_navigation WHERE name='Option Lists';
-SELECT @wt := max(weight) FROM civicrm_navigation WHERE parent_id=@navid;
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-VALUES
-( @domainID, 'civicrm/admin/options/wordreplacements&reset=1', '{ts escape="sql"}Word Replacements{/ts}', 'Word Replacements', 'administer CiviCRM', '', @navid, '1', NULL, @wt + 1);
-
--- CRM-6532
-UPDATE civicrm_state_province SET name = 'Bahia' WHERE name = 'Baia';
-UPDATE civicrm_state_province SET name = 'Tocantins' WHERE name = 'Tocatins';
-
--- CRM-6330
-SELECT @nav_mt := id FROM civicrm_navigation WHERE name = 'Manage Tags (Categories)';
-SELECT @nav_fmdc := id FROM civicrm_navigation WHERE name = 'Find and Merge Duplicate Contacts';
-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;
-
-UPDATE civicrm_navigation SET has_separator = '1' where id = @nav_mt;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-VALUES
- ( @domainID, 'civicrm/contact/deduperules&reset=1', '{ts escape="sql"}Find and Merge Duplicate Contacts{/ts}','Find and Merge Duplicate Contacts', 'administer dedupe rules,merge duplicate contacts', 'OR', @nav_c, '1', NULL, @nav_c_wt+1 );
-
---CRM-6565
-ALTER TABLE civicrm_activity
-ADD INDEX UI_source_record_id(source_record_id),
-ADD INDEX index_medium_id (medium_id),
-ADD INDEX index_is_current_revision (is_current_revision),
-ADD INDEX index_is_deleted (is_deleted);
-
-{if $addActivityTypeIndex}
-ALTER TABLE civicrm_activity
-ADD INDEX UI_activity_type_id (activity_type_id);
-{/if}
-
--- CRM-6622
-SELECT @uf_group_id_summary := max(id) FROM civicrm_uf_group WHERE name = 'summary_overlay';
-UPDATE civicrm_uf_field SET phone_type_id = 1 WHERE uf_group_id = @uf_group_id_summary AND location_type_id = 1 AND field_name = 'phone' AND phone_type_id IS NULL;
-UPDATE civicrm_uf_field SET location_type_id = 1, phone_type_id = 2 WHERE uf_group_id = @uf_group_id_summary AND location_type_id = 2 AND field_name = 'phone' AND phone_type_id IS NULL;
-
--- CRM-6577
-ALTER TABLE `civicrm_mapping_field` ADD COLUMN `website_type_id` int(10) unsigned DEFAULT NULL COMMENT 'Which type of website does this site belong';
-
--- CRM-6631
-{include file='../CRM/Upgrade/3.2.1.msg_template/civicrm_msg_template.tpl'}
\ No newline at end of file
+++ /dev/null
--- db template customization
-
-CREATE TABLE IF NOT EXISTS civicrm_persistent (
- id int(10) unsigned NOT NULL auto_increment COMMENT 'Persistent Record Id',
- context varchar(255) collate utf8_unicode_ci NOT NULL COMMENT 'Context for which name data pair is to be stored',
- name varchar(255) collate utf8_unicode_ci NOT NULL COMMENT 'Name of Context',
- data longtext collate utf8_unicode_ci COMMENT 'data associated with name',
- is_config tinyint(4) NOT NULL default '0' COMMENT 'Config Settings',
- PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4;
-
---CRM-6655
-SELECT @domainID := min(id) FROM civicrm_domain;
-SELECT @reportlastID := id FROM civicrm_navigation where name = 'Reports';
-SELECT @ogrID := max(id) from civicrm_option_group where name = 'report_template';
-SELECT @nav_max_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @reportlastID;
-SELECT @grantCompId := max(id) FROM civicrm_component where name = 'CiviGrant';
-SELECT @eventCompId := max(id) FROM civicrm_component where name = 'CiviEvent';
-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 )
-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
- ( @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();
-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"}Grant Report{/ts}', '{literal}Grant Report{/literal}', 'access CiviGrant', '',@reportlastID, '1', NULL, @nav_max_weight+1 );
-
-UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID;
+++ /dev/null
-SELECT @domainID := min(id) FROM civicrm_domain;
-
--- CRM-6694, CRM-6716
-SELECT @navid := id FROM civicrm_navigation WHERE name='Option Lists';
-SELECT @wt := max(weight) FROM civicrm_navigation WHERE parent_id=@navid;
-INSERT INTO civicrm_navigation
- ( domain_id, label, name, url, permission, permission_operator, parent_id, is_active, has_separator, weight )
-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';
-
---CRM-6655
- 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`
- 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`
- 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`
- SET {localize field='label'}label = name{/localize}
- WHERE name IN ('day','month','week','year');
+++ /dev/null
--- 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;
-
-UPDATE civicrm_option_value val
- SET val.value = @activity_type_max_val+1,
- val.weight = @activity_type_max_wt+1
- WHERE val.option_group_id = @option_group_id_act
- AND val.name = 'Print PDF Letter';
-
+++ /dev/null
--- CRM-7044
-UPDATE civicrm_state_province SET name = 'Khomas' WHERE name = 'Khomae';
+++ /dev/null
--- 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)
-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
- 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;
-
- 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_act, {localize}'Print PDF Letter'{/localize}, (SELECT @activity_type_max_val := @activity_type_max_val + 1 ), 'Print PDF Letter', NULL, 1, NULL, (SELECT @activity_type_max_wt := @activity_type_max_wt + 1 ), {localize}'Print PDF Letter.'{/localize}, 0, 1, 1, NULL, NULL, NULL);
-
--- CRM-5344
- ALTER TABLE civicrm_uf_group
- MODIFY notify text;
-
--- CRM-5598
-
-SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
-
-SELECT @atOpt_max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
-
-SELECT @atOpt_max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val where val.option_group_id = @option_group_id_activity_type;
-
-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 ),
- (@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 )
- 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.';
-
--- 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' );
-
- 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';
-
- SELECT @domain_id := min(id) FROM civicrm_domain;
- SELECT @nav_case := id FROM civicrm_navigation WHERE name = 'CiviCase';
- SELECT @nav_case_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_case;
-
- 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 );
-
--- CRM-5766
- ALTER TABLE civicrm_price_field
- ADD `visibility_id` int(10) unsigned default 1 COMMENT 'Implicit FK to civicrm_option_group with name = visibility.';
-
--- 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?';
-
--- CRM-5724
-
- ALTER TABLE civicrm_price_field
- ADD `count` int(10) unsigned default NULL COMMENT 'Participant count for field.';
-
- 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` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `entity_table` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
- `entity_id` int(10) unsigned NOT NULL,
- `financial_trxn_id` int(10) unsigned DEFAULT NULL,
- `amount` decimal(20,2) NOT NULL COMMENT 'allocated amount of transaction to this entity',
- PRIMARY KEY (`id`),
- KEY `FK_civicrm_entity_financial_trxn_financial_trxn_id` (`financial_trxn_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
--- civicrm_financial_account
- CREATE TABLE `civicrm_financial_account` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `account_type_id` int(10) unsigned NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
--- 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'
- FROM civicrm_financial_trxn ft
- ON DUPLICATE KEY UPDATE civicrm_entity_financial_trxn.entity_id = ft.contribution_id;
-
--- ALTER civicrm_financial_trxn
- ALTER TABLE `civicrm_financial_trxn`
- DROP FOREIGN KEY `FK_civicrm_financial_trxn_contribution_id` ;
- 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_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
- ('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`)
- 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),
- (@option_group_id_accTp,{localize}'{ts escape="sql"}Income{/ts}'{/localize}, 3, 'Income', NULL, 0, NULL, 1,{localize} NULL {/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_accTp, {localize}'{ts escape="sql"}Expense{/ts}'{/localize}, 4, 'Expense', NULL, 0, NULL, 1,{localize} NULL {/localize}, 0, 0, 1, NULL, NULL);
-
--- CRM-5883
-
--- 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
- ) 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 ;
-
--- drop columns home_URL
- ALTER TABLE civicrm_contact DROP home_URL;
-
--- add option group website_type
- INSERT INTO civicrm_option_group
- (name, {localize field='description'}description{/localize}, is_reserved, is_active)
- 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)
- 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),
- (@option_group_id_website, {localize}'Facebook'{/localize}, 3, 'Facebook', NULL, 0, NULL, 3, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@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}'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
- 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
- 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,
- ADD used_for varchar(64) NULL DEFAULT NULL;
-
- UPDATE civicrm_tag
- SET used_for ='civicrm_contact';
-
--- Add new activity type Change Case Tag
- SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
- SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
- 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_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';
-
--- CRM-6004
-ALTER TABLE civicrm_uf_field
- ADD help_pre text COLLATE utf8_unicode_ci COMMENT 'Description and/or help text to display before this field.';
-
--- CRM-6002
- INSERT INTO `civicrm_state_province`
- (`name`, `abbreviation`, `country_id`)
- VALUES
- ('La Rioja', 'F', 1010 );
-
--- CRM-6037
-SELECT @bounceTypeID := max(id) FROM civicrm_mailing_bounce_type WHERE name = 'Host';
-INSERT INTO civicrm_mailing_bounce_pattern
- (bounce_type_id, pattern)
- VALUES
- (@bounceTypeID, 'not connected');
-
--- CRM-6045
-UPDATE civicrm_payment_processor_type
-SET url_site_test_default = 'https://www.payjunctionlabs.com/quick_link' WHERE name = 'PayJunction';
-
--- CRM-5803
- SELECT @domain_id := min(id) FROM civicrm_domain;
- SELECT @nav_search := id FROM civicrm_navigation WHERE name = 'Search...';
- 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,
-'', @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`)
-VALUES
- (@option_group_id_mt, {localize}'Export Activities'{/localize}, @max_val+1, 'Export Activity', NULL, 0, 0, @max_wt+1, 0, 1, 1);
-
--- CRM-6063
- INSERT IGNORE INTO civicrm_state_province
- (`name`, `abbreviation`, `country_id` )
- VALUES
- ( 'Andorra la Vella', '07', 1005 ),
- ( 'Canillo', '02', 1005 ),
- ( 'Encamp', '03', 1005 ),
- ( 'Escaldes-Engordany', '08', 1005 ),
- ( 'La Massana', '04', 1005 ),
- ( 'Ordino','05', 1005 ),
- ( 'Sant Julia de Loria', '06', 1005 );
-
--- CRM-5673
-ALTER TABLE civicrm_contact ADD is_deleted TINYINT;
-ALTER TABLE civicrm_contact ADD INDEX index_is_deleted(is_deleted);
-
--- CRM-5467
- ALTER TABLE civicrm_contact
- MODIFY image_URL varchar(255) COMMENT 'Optional URL for preferred image (photo, logo, etc.) to display for this contact';
-
--- CRM-6095
- UPDATE civicrm_navigation SET permission ='access my cases and activities,access all cases and activities', permission_operator='OR' WHERE civicrm_navigation.name= 'Dashboard' AND url='civicrm/case&reset=1';
- UPDATE civicrm_navigation SET permission ='access my cases and activities,access all cases and activities', permission_operator='OR' WHERE civicrm_navigation.name IN ( 'Find Cases','Cases');
- UPDATE civicrm_navigation SET permission ='access all cases and activities' WHERE permission='access CiviCase';
- UPDATE civicrm_navigation SET permission ='access CiviGrant,administer CiviCase,access my cases and activities,access all cases and activities' WHERE civicrm_navigation.name= 'Other';
- UPDATE civicrm_navigation SET permission ='administer CiviCase', permission_operator= NULL WHERE civicrm_navigation.name IN ( 'CiviCase','Case Types', 'Redaction Rules');
- UPDATE civicrm_report_instance SET permission ='access all cases and activities' WHERE permission='access CiviCase';
\ No newline at end of file
+++ /dev/null
--- CRM-6102
-
-{include file='../CRM/Upgrade/3.2.alpha2.msg_template/civicrm_msg_template.tpl'}
\ No newline at end of file
+++ /dev/null
--- CRM-6228
-
-{include file='../CRM/Upgrade/3.2.alpha3.msg_template/civicrm_msg_template.tpl'}
-
--- CRM-6144
- 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'
- AND civicrm_option_value.name = 'Close Case';
-
--- CRM-6102
-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}',
- 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
- ('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`)
- 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
--- 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}';
- ALTER TABLE `civicrm_contribution_recur` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
--- civicrm_grant
- ALTER TABLE `civicrm_grant` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.';
- UPDATE `civicrm_grant` SET `currency` = '{$config->defaultCurrency}';
- ALTER TABLE `civicrm_grant` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
--- civicrm_entity_financial_trxn
- ALTER TABLE `civicrm_entity_financial_trxn` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.';
- UPDATE `civicrm_entity_financial_trxn` SET `currency` = '{$config->defaultCurrency}';
- ALTER TABLE `civicrm_entity_financial_trxn` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
--- civicrm_product
- ALTER TABLE `civicrm_product` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.';
- UPDATE `civicrm_product` SET `currency` = '{$config->defaultCurrency}';
- ALTER TABLE `civicrm_product` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
--- civicrm_pcp
- ALTER TABLE `civicrm_pcp` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.';
- UPDATE `civicrm_pcp` SET `currency` = '{$config->defaultCurrency}';
- ALTER TABLE `civicrm_pcp` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
--- civicrm_pledge
- ALTER TABLE `civicrm_pledge` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.';
- UPDATE `civicrm_pledge` SET `currency` = '{$config->defaultCurrency}';
- ALTER TABLE `civicrm_pledge` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
--- civicrm_contribution_soft
- ALTER TABLE `civicrm_contribution_soft` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.';
- UPDATE `civicrm_contribution_soft` SET `currency` = '{$config->defaultCurrency}';
- ALTER TABLE `civicrm_contribution_soft` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
--- civicrm_pledge_payment
- ALTER TABLE `civicrm_pledge_payment` ADD COLUMN `currency` varchar(3) NULL COMMENT '3 character string, value from config setting or input via user.';
- UPDATE `civicrm_pledge_payment` SET `currency` = '{$config->defaultCurrency}';
- ALTER TABLE `civicrm_pledge_payment` MODIFY COLUMN `currency` varchar(3) NOT NULL COMMENT '3 character string, value from config setting or input via user.';
-
--- Fixing length of currency VARCHAR(64) to VARCHAR(3)
--- civicrm_financial_trxn
- ALTER TABLE `civicrm_financial_trxn` MODIFY `currency` VARCHAR(3);
--- civicrm_contribution
- ALTER TABLE `civicrm_contribution` MODIFY `currency` VARCHAR(3);
--- civicrm_participant
- UPDATE `civicrm_participant` SET `fee_currency` = '{$config->defaultCurrency}' WHERE `fee_currency` IS NULL;
- ALTER TABLE `civicrm_participant` MODIFY `fee_currency` VARCHAR(3) NOT NULL;
-
-
--- 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.';
-
--- CRM-3854
-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',
- `format` text COLLATE utf8_unicode_ci DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
--- CRM-6154
- ALTER TABLE civicrm_domain
- 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;
-ALTER TABLE `civicrm_contact` MODIFY COLUMN `is_deleted` boolean NOT NULL DEFAULT 0;
-
--- CRM-6198
-
-DELETE FROM `civicrm_state_province` WHERE `name` IN ('Freeport', 'Fresh Creek', 'Governor\'s Harbour' , 'Green Turtle Cay', 'Harbour Island', 'High Rock', 'Kemps Bay', 'Marsh Harbour','Nicholls Town and Berry Islands' ,'Rock Sound','Sandy Point','San Salvador and Rum Cay','Bandundu', 'Bas-Congo' ,'Haut-Congo', 'Kasai-Occidental','Katanga', 'Orientale' );
-
-INSERT IGNORE INTO civicrm_state_province
- (`name`, `abbreviation`, `country_id` )
- VALUES
- ( 'Abaco Islands', 'AB',1212),
- ( 'Andros Island', 'AN',1212 ),
- ( 'Berry Islands', 'BR',1212 ),
- ( 'Eleuthera', 'EL', 1212 ),
- ( 'Grand Bahama', 'GB', 1212 ),
- ( '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 );
-
--- CRM-6159
-UPDATE civicrm_mailing_bounce_pattern SET pattern = 'over\\s?quota' WHERE pattern = 'overs?quota';
-
--- CRM-6180
-UPDATE civicrm_state_province SET name = 'Durrës' WHERE name = 'Durrsës';
-UPDATE civicrm_state_province SET name = 'Korçë' WHERE name = 'Korcë';
+++ /dev/null
--- schema changes for 3.2 alpha4 tag
--- change is_hidden to is_tagset in civicrm_tag
-ALTER TABLE `civicrm_tag` CHANGE `is_hidden` `is_tagset` TINYINT( 4 ) NULL DEFAULT '0';
-
--- CRM-6229
-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
-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;
-
--- CRM-6294 (event badge support)
-{if $multilingual}
- INSERT INTO civicrm_option_group
- ( name, {foreach from=$locales item=locale}description_{$locale}, {/foreach} is_reserved, is_active)
- VALUES
- ( 'event_badge', {foreach from=$locales item=locale}'Event Badge', {/foreach} 0, 1 );
-{else}
- INSERT INTO civicrm_option_group
- (name, description, is_reserved, is_active )
- VALUES
- ('event_badge', 'event_badge', 0, 1 );
-{/if}
-
-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 )
- 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 )
- 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 );
-{/if}
-
+++ /dev/null
--- CRM-5224
-SELECT @country_id := id FROM civicrm_country WHERE name = 'United Kingdom';
-INSERT IGNORE INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (2712, @country_id, 'LIN', 'Lincolnshire');
-
--- 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
- ( @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);
-
--- CRM-6294
-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 )
- 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 )
- 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}
-
-
+++ /dev/null
--- CRM-6400
-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' );
-
--- 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`)
- 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, '\ 1');
-
--- CRM-6410
-SELECT @bounceTypeID := MAX(id) FROM civicrm_mailing_bounce_type WHERE name = 'Invalid';
-INSERT INTO civicrm_mailing_bounce_pattern (bounce_type_id, pattern) VALUES (@bounceTypeID, '^Validation failed for:');
+++ /dev/null
--- CRM-6451
-{if $multilingual}
- -- 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
- {foreach from=$locales item=loc}
- 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.
- {foreach from=$locales item=loc}
- ALTER TABLE civicrm_membership_status DROP name_{$loc};
- {/foreach}
-{else}
- -- add a label column and populate it from the name column
- ALTER TABLE civicrm_membership_status ADD label VARCHAR(128) COMMENT 'Label for Membership Status';
- UPDATE civicrm_membership_status SET label = name;
-{/if}
-
-
--- CRM-6004
-{if $multilingual && !$hasLocalizedPreHelpCols}
- {foreach from=$locales item=loc}
- ALTER TABLE civicrm_uf_field ADD help_pre_{$loc} text COMMENT 'Description and/or help text to display before this field.';
- UPDATE civicrm_uf_field SET help_pre_{$loc} = help_pre;
- {/foreach}
- ALTER TABLE civicrm_uf_field DROP help_pre;
-{/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
-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
-AND civicrm_uf_group.name = 'summary_overlay';
-
-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
+++ /dev/null
--- CRM-6458
-SELECT @domainID := min(id) FROM civicrm_domain;
-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`)
-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
- ( @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
+++ /dev/null
--- CRM-7088 giving respect to 'gotv campaign contacts' permission.
-UPDATE civicrm_navigation
- SET permission = CONCAT( permission, ',gotv campaign contacts' )
- WHERE name in ( 'Other', 'Campaigns', 'Voter Listing' );
-
--- CRM-7151
-SELECT @domainID := min(id) FROM civicrm_domain;
-SELECT @reportlastID := id FROM civicrm_navigation where name = 'Reports';
-SELECT @nav_max_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @reportlastID;
-
-INSERT INTO `civicrm_report_instance`
- ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_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( );
-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"}Mail Bounce Report{/ts}', '{literal}Mail Bounce Report {/literal}', 'access CiviMail', '',@reportlastID, '1', NULL,@nav_max_weight+1 );
-
-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
- ( @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( );
-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"}Mail Summary Report{/ts}', '{literal}Mail Summary Report{/literal}', 'access CiviMail', '',@reportlastID, '1', NULL,@nav_max_weight+2 );
-
-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
- ( @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( );
-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"}Mail Opened Report{/ts}', '{literal}Mail Opened Report{/literal}', 'access CiviMail', '',@reportlastID, '1', NULL, @nav_max_weight+3 );
-
-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
- ( @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( );
-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"}Mail Clickthrough Report{/ts}', '{literal}Mail Clickthrough Report{/literal}', 'access CiviMail', '',@reportlastID, '1', NULL, @nav_max_weight+4 );
-
-UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID;
-
--- CRM-7123
-SELECT @option_group_id_languages := MAX(id) FROM civicrm_option_group WHERE name = 'languages';
-UPDATE civicrm_option_value SET name = 'af_ZA' WHERE value = 'af' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sq_AL' WHERE value = 'sq' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ar_EG' WHERE value = 'ar' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'bg_BG' WHERE value = 'bg' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ca_ES' WHERE value = 'ca' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'zh_CN' WHERE value = 'zh' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'cs_CZ' WHERE value = 'cs' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'da_DK' WHERE value = 'da' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'nl_NL' WHERE value = 'nl' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'en_US' WHERE value = 'en' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'et_EE' WHERE value = 'et' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'fi_FI' WHERE value = 'fi' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'fr_FR' WHERE value = 'fr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'de_DE' WHERE value = 'de' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'el_GR' WHERE value = 'el' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'he_IL' WHERE value = 'he' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'hi_IN' WHERE value = 'hi' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'hu_HU' WHERE value = 'hu' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'id_ID' WHERE value = 'id' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'it_IT' WHERE value = 'it' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ja_JP' WHERE value = 'ja' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'km_KH' WHERE value = 'km' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'lt_LT' WHERE value = 'lt' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'no_NO' WHERE value = 'no' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'pl_PL' WHERE value = 'pl' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'pt_PT' WHERE value = 'pt' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ro_RO' WHERE value = 'ro' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ru_RU' WHERE value = 'ru' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sk_SK' WHERE value = 'sk' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sl_SI' WHERE value = 'sl' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'es_ES' WHERE value = 'es' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sv_SE' WHERE value = 'sv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'te_IN' WHERE value = 'te' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'th_TH' WHERE value = 'th' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'tr_TR' WHERE value = 'tr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'vi_VN' WHERE value = 'vi' AND option_group_id = @option_group_id_languages;
-
-UPDATE civicrm_option_value SET name = 'ab_GE' WHERE value = 'ab' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'aa_ET' WHERE value = 'aa' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ak_GH' WHERE value = 'ak' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'am_ET' WHERE value = 'am' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'an_ES' WHERE value = 'an' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'hy_AM' WHERE value = 'hy' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'as_IN' WHERE value = 'as' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'av_RU' WHERE value = 'av' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ae_XX' WHERE value = 'ae' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ay_BO' WHERE value = 'ay' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'az_AZ' WHERE value = 'az' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'bm_ML' WHERE value = 'bm' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ba_RU' WHERE value = 'ba' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'eu_ES' WHERE value = 'eu' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'be_BY' WHERE value = 'be' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'bn_BD' WHERE value = 'bn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'bh_IN' WHERE value = 'bh' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'bi_VU' WHERE value = 'bi' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'bs_BA' WHERE value = 'bs' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'br_FR' WHERE value = 'br' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'my_MM' WHERE value = 'my' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ch_GU' WHERE value = 'ch' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ny_MW' WHERE value = 'ny' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'cv_RU' WHERE value = 'cv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kw_GB' WHERE value = 'kw' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'co_FR' WHERE value = 'co' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'cr_CA' WHERE value = 'cr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'hr_HR' WHERE value = 'hr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'dv_MV' WHERE value = 'dv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'dz_BT' WHERE value = 'dz' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'eo_XX' WHERE value = 'eo' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ee_GH' WHERE value = 'ee' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'fo_FO' WHERE value = 'fo' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'fj_FJ' WHERE value = 'fj' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ff_SN' WHERE value = 'ff' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'gl_ES' WHERE value = 'gl' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ka_GE' WHERE value = 'ka' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'gn_PY' WHERE value = 'gn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'gu_IN' WHERE value = 'gu' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ht_HT' WHERE value = 'ht' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ha_NG' WHERE value = 'ha' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'hz_NA' WHERE value = 'hz' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ho_PG' WHERE value = 'ho' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ia_XX' WHERE value = 'ia' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ie_XX' WHERE value = 'ie' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ga_IE' WHERE value = 'ga' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ig_NG' WHERE value = 'ig' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ik_US' WHERE value = 'ik' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'io_XX' WHERE value = 'io' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'is_IS' WHERE value = 'is' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'iu_CA' WHERE value = 'iu' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'jv_ID' WHERE value = 'jv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kl_GL' WHERE value = 'kl' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kn_IN' WHERE value = 'kn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kr_NE' WHERE value = 'kr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ks_IN' WHERE value = 'ks' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kk_KZ' WHERE value = 'kk' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ki_KE' WHERE value = 'ki' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'rw_RW' WHERE value = 'rw' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ky_KG' WHERE value = 'ky' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kv_RU' WHERE value = 'kv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kg_CD' WHERE value = 'kg' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ko_KR' WHERE value = 'ko' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ku_IQ' WHERE value = 'ku' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'kj_NA' WHERE value = 'kj' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'la_VA' WHERE value = 'la' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'lb_LU' WHERE value = 'lb' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'lg_UG' WHERE value = 'lg' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'li_NL' WHERE value = 'li' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ln_CD' WHERE value = 'ln' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'lo_LA' WHERE value = 'lo' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'lu_CD' WHERE value = 'lu' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'lv_LV' WHERE value = 'lv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'gv_IM' WHERE value = 'gv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'mk_MK' WHERE value = 'mk' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'mg_MG' WHERE value = 'mg' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ms_MY' WHERE value = 'ms' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ml_IN' WHERE value = 'ml' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'mt_MT' WHERE value = 'mt' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'mi_NZ' WHERE value = 'mi' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'mr_IN' WHERE value = 'mr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'mh_MH' WHERE value = 'mh' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'mn_MN' WHERE value = 'mn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'na_NR' WHERE value = 'na' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'nv_US' WHERE value = 'nv' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'nb_NO' WHERE value = 'nb' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'nd_ZW' WHERE value = 'nd' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ne_NP' WHERE value = 'ne' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ng_NA' WHERE value = 'ng' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'nn_NO' WHERE value = 'nn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ii_CN' WHERE value = 'ii' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'nr_ZA' WHERE value = 'nr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'oc_FR' WHERE value = 'oc' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'oj_CA' WHERE value = 'oj' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'cu_BG' WHERE value = 'cu' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'om_ET' WHERE value = 'om' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'or_IN' WHERE value = 'or' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'os_GE' WHERE value = 'os' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'pa_IN' WHERE value = 'pa' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'pi_KH' WHERE value = 'pi' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'fa_IR' WHERE value = 'fa' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ps_AF' WHERE value = 'ps' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'qu_PE' WHERE value = 'qu' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'rm_CH' WHERE value = 'rm' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'rn_BI' WHERE value = 'rn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sa_IN' WHERE value = 'sa' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sc_IT' WHERE value = 'sc' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sd_IN' WHERE value = 'sd' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'se_NO' WHERE value = 'se' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sm_WS' WHERE value = 'sm' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sg_CF' WHERE value = 'sg' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sr_RS' WHERE value = 'sr' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'gd_GB' WHERE value = 'gd' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sn_ZW' WHERE value = 'sn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'si_LK' WHERE value = 'si' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'so_SO' WHERE value = 'so' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'st_ZA' WHERE value = 'st' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'su_ID' WHERE value = 'su' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'sw_TZ' WHERE value = 'sw' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ss_ZA' WHERE value = 'ss' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ta_IN' WHERE value = 'ta' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'tg_TJ' WHERE value = 'tg' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ti_ET' WHERE value = 'ti' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'bo_CN' WHERE value = 'bo' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'tk_TM' WHERE value = 'tk' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'tl_PH' WHERE value = 'tl' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'tn_ZA' WHERE value = 'tn' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'to_TO' WHERE value = 'to' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ts_ZA' WHERE value = 'ts' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'tt_RU' WHERE value = 'tt' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'tw_GH' WHERE value = 'tw' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ty_PF' WHERE value = 'ty' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ug_CN' WHERE value = 'ug' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'uk_UA' WHERE value = 'uk' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'ur_PK' WHERE value = 'ur' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'uz_UZ' WHERE value = 'uz' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 've_ZA' WHERE value = 've' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'vo_XX' WHERE value = 'vo' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'wa_BE' WHERE value = 'wa' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'cy_GB' WHERE value = 'cy' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'wo_SN' WHERE value = 'wo' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'fy_NL' WHERE value = 'fy' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'xh_ZA' WHERE value = 'xh' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'yi_US' WHERE value = 'yi' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'yo_NG' WHERE value = 'yo' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'za_CN' WHERE value = 'za' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET name = 'zu_ZA' WHERE value = 'zu' AND option_group_id = @option_group_id_languages;
-
-UPDATE civicrm_option_value SET {localize field='label'}label = 'Chinese (China)' {/localize} WHERE name = 'zh_CN' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET {localize field='label'}label = 'English (United States)' {/localize} WHERE name = 'en_US' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET {localize field='label'}label = 'French (France)' {/localize} WHERE name = 'fr_FR' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET {localize field='label'}label = 'Portuguese (Portugal)' {/localize} WHERE name = 'pt_PT' AND option_group_id = @option_group_id_languages;
-UPDATE civicrm_option_value SET {localize field='label'}label = 'Spanish; Castilian (Spain)'{/localize} WHERE name = 'es_ES' AND option_group_id = @option_group_id_languages;
-
-SELECT @weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_languages;
-INSERT INTO civicrm_option_value
- (option_group_id, name, value, {localize field='label'}label{/localize}, weight) VALUES
- (@option_group_id_languages, 'zh_TW', 'zh', {localize}'Chinese (Taiwan)'{/localize}, @weight := @weight + 1),
- (@option_group_id_languages, 'en_AU', 'en', {localize}'English (Australia)'{/localize}, @weight := @weight + 1),
- (@option_group_id_languages, 'en_CA', 'en', {localize}'English (Canada)'{/localize}, @weight := @weight + 1),
- (@option_group_id_languages, 'en_GB', 'en', {localize}'English (United Kingdom)'{/localize}, @weight := @weight + 1),
- (@option_group_id_languages, 'fr_CA', 'fr', {localize}'French (Canada)'{/localize}, @weight := @weight + 1),
- (@option_group_id_languages, 'pt_BR', 'pt', {localize}'Portuguese (Brazil)'{/localize}, @weight := @weight + 1),
- (@option_group_id_languages, 'es_MX', 'es', {localize}'Spanish; Castilian (Mexico)'{/localize}, @weight := @weight + 1);
-
--- CRM-7119: switch civicrm_contact.preferred_language to the relevant xx_YY codes (special-casing language variants first)
-UPDATE civicrm_contact SET preferred_language = 'en_US' WHERE preferred_language = 'en';
-UPDATE civicrm_contact SET preferred_language = 'es_ES' WHERE preferred_language = 'es';
-UPDATE civicrm_contact SET preferred_language = 'fr_FR' WHERE preferred_language = 'fr';
-UPDATE civicrm_contact SET preferred_language = 'pt_PT' WHERE preferred_language = 'pt';
-UPDATE civicrm_contact SET preferred_language = 'zh_CN' WHERE preferred_language = 'zh';
-UPDATE civicrm_contact SET preferred_language = (SELECT name FROM civicrm_option_value WHERE value = preferred_language AND option_group_id = @option_group_id_languages LIMIT 1) WHERE LENGTH(preferred_language) = 2;
-
--- add logging report templates
-SELECT @option_group_id_report := MAX(id) FROM civicrm_option_group WHERE name = 'report_template';
-SELECT @weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_languages;
-INSERT INTO civicrm_option_value
- (option_group_id, {localize field='label'}label{/localize}, value, name, weight, {localize field='description'}description{/localize}, is_active) VALUES
- (@option_group_id_report, {localize}'Contact Logging Report (Summary)'{/localize}, 'logging/contact/summary', 'CRM_Report_Form_Contact_LoggingSummary', @weight := @weight + 1, {localize}'Contact modification report for the logging infrastructure (summary).'{/localize}, 0),
- (@option_group_id_report, {localize}'Contact Logging Report (Detail)'{/localize}, 'logging/contact/detail', 'CRM_Report_Form_Contact_LoggingDetail', @weight := @weight + 1, {localize}'Contact modification report for the logging infrastructure (detail).'{/localize}, 0);
+++ /dev/null
--- CRM-7127
-ALTER TABLE civicrm_membership_type
- DROP FOREIGN KEY `FK_civicrm_membership_type_relationship_type_id`,
- DROP INDEX `FK_civicrm_membership_type_relationship_type_id`,
- CHANGE relationship_type_id relationship_type_id VARCHAR( 64 ) NULL DEFAULT NULL,
- CHANGE relationship_direction relationship_direction VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
-
-ALTER TABLE civicrm_membership_type
- ADD INDEX index_relationship_type_id(relationship_type_id);
\ No newline at end of file
+++ /dev/null
--- CRM-7171
-
-ALTER TABLE `civicrm_mailing`
- ADD `scheduled_date` datetime default NULL COMMENT 'Date and time this mailing was scheduled.',
- ADD `approver_id` int(10) unsigned default NULL COMMENT 'FK to Contact ID who approved this mailing',
- ADD CONSTRAINT `FK_civicrm_mailing_approver_id` FOREIGN KEY (`approver_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL,
- ADD `approval_date` datetime default NULL COMMENT 'Date and time this mailing was approved.',
- ADD `approval_status_id` int unsigned default NULL COMMENT 'The status of this mailing. values: none, approved, rejected',
- ADD `approval_note` longtext default NULL COMMENT 'Note behind the decision.',
- ADD `visibilty` enum('User and User Admin Only','Public User Pages') default 'User and User Admin Only' COMMENT 'In what context(s) is the mailing contents visible (online viewing)';
-
-UPDATE `civicrm_navigation` SET `permission` = 'access CiviMail,create mailings,approve mailings,schedule mailings', `permission_operator` = 'OR' WHERE name = 'Mailings';
-
-UPDATE `civicrm_navigation` SET `permission` = 'access CiviMail,create mailings', `permission_operator` = 'OR' WHERE name = 'Draft and Unscheduled Mailings';
-
-UPDATE `civicrm_navigation` SET `permission` = 'access CiviMail,approve mailings', `permission_operator` = 'OR' WHERE name = 'Scheduled and Sent Mailings';
-
---CRM-7180, Change Participant Listing Templates menu title`
-
-UPDATE `civicrm_navigation` SET `label` = '{ts escape="sql"}Participant Listing Options{/ts}', `name`= 'Participant Listing Options' WHERE name = 'Participant Listing Templates';
-
---CRM--7197
-{if $dropMailingIndex}
-ALTER TABLE civicrm_mailing_job
-DROP FOREIGN KEY parent_id,
-DROP INDEX 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
-UPDATE civicrm_membership_type
- SET relationship_type_id = NULL, relationship_direction = NULL
- WHERE relationship_type_id = 'Array' OR relationship_type_id IS NULL;
-
--- CRM-7171, Rules Mailing integration
-{if $multilingual}
- INSERT INTO civicrm_option_group
- ( name, {foreach from=$locales item=locale}description_{$locale}, {/foreach} is_reserved, is_active)
- VALUES
- ( 'mail_approval_status', {foreach from=$locales item=locale}'CiviMail Approval Status', {/foreach} 0, 1 );
-{else}
- INSERT INTO civicrm_option_group
- (name, description, is_reserved, is_active )
- VALUES
- ('mail_approval_status', 'CiviMail Approval Status', 0, 1 );
-{/if}
-
-SELECT @mailCompId := max(id) FROM civicrm_component where name = 'CiviMail';
-SELECT @option_group_id_approvalStatus := max(id) from civicrm_option_group where name = 'mail_approval_status';
-
-{if $multilingual}
- INSERT INTO civicrm_option_value
- (option_group_id, {foreach from=$locales item=locale}label_{$locale}, {/foreach} name, value, weight, is_active, component_id, is_default )
-
- VALUES
- (@option_group_id_approvalStatus, {foreach from=$locales item=locale}'Approved', {/foreach} 'Approved', 1, 1, 1, @mailCompId, 1 ),
- (@option_group_id_approvalStatus, {foreach from=$locales item=locale}'Rejected', {/foreach} 'Rejected', 2, 2, 1, @mailCompId, 0 ),
- (@option_group_id_approvalStatus, {foreach from=$locales item=locale}'None', {/foreach} 'None', 3, 3, 1, @mailCompId, 0 );
-
-{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 );
-{/if}
-
--- CRM-7170
-UPDATE civicrm_report_instance SET form_values = '{literal}a:39:{s:6:"fields";a:5:{s:2:"id";s:1:"1";s:10:"first_name";s:1:"1";s:9:"last_name";s:1:"1";s:11:"bounce_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:"in";s:18:"mailing_name_value";a: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:17:"custom_9_relative";s:1:"0";s:13:"custom_9_from";s:0:"";s:11:"custom_9_to";s:0:"";s:12:"custom_10_op";s:2:"in";s:15:"custom_10_value";a:0:{}s:12:"custom_11_op";s:3:"has";s:15:"custom_11_value";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:6:"groups";s:0:"";s:6:"charts";s:0:"";s:9:"domain_id";i:1;}{/literal}' WHERE report_id = 'Mailing/bounce';
-
-UPDATE civicrm_report_instance SET form_values = '{literal}a:25:{s:6:"fields";a:5:{s:4:"name";s:1:"1";s:11:"queue_count";s:1:"1";s:15:"delivered_count";s:1:"1";s:12:"bounce_count";s:1:"1";s:10:"open_count";s:1:"1";}s:15:"is_completed_op";s:2:"eq";s:18:"is_completed_value";s:1:"1";s:15:"mailing_name_op";s:2:"in";s:18:"mailing_name_value";a:0:{}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:6:"groups";s:0:"";s:6:"charts";s:0:"";s:9:"domain_id";i:1;}{/literal}' WHERE report_id = 'Mailing/summary';
-
-UPDATE civicrm_report_instance SET form_values = '{literal}a:37:{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:"in";s:18:"mailing_name_value";a: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:17:"custom_9_relative";s:1:"0";s:13:"custom_9_from";s:0:"";s:11:"custom_9_to";s:0:"";s:12:"custom_10_op";s:2:"in";s:15:"custom_10_value";a:0:{}s:12:"custom_11_op";s:3:"has";s:15:"custom_11_value";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:6:"groups";s:0:"";s:6:"charts";s:0:"";s:9:"domain_id";i:1;}{/literal}' WHERE report_id = 'Mailing/opened';
-
-UPDATE civicrm_report_instance SET form_values = '{literal}a:37:{s:6:"fields";a:5:{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:3:"url";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:"in";s:18:"mailing_name_value";a: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:17:"custom_9_relative";s:1:"0";s:13:"custom_9_from";s:0:"";s:11:"custom_9_to";s:0:"";s:12:"custom_10_op";s:2:"in";s:15:"custom_10_value";a:0:{}s:12:"custom_11_op";s:3:"has";s:15:"custom_11_value";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:6:"groups";s:0:"";s:6:"charts";s:0:"";s:9:"domain_id";i:1;}{/literal}' WHERE report_id = 'Mailing/clicks';
-
--- CRM-7115
-UPDATE civicrm_payment_processor
- SET is_recur = 1,
- payment_processor_type = 'AuthNet'
- WHERE payment_processor_type = 'AuthNet_AIM';
-
-UPDATE civicrm_payment_processor_type
- SET is_recur = 1,
- name = 'AuthNet',
- title = '{ts escape="sql"}Authorize.Net{/ts}'
- WHERE name = 'AuthNet_AIM';
-
-ALTER TABLE `civicrm_contribution_recur` ADD `payment_processor_id` INT( 10 ) UNSIGNED NULL COMMENT 'Foreign key to civicrm_payment_processor.id';
-ALTER TABLE `civicrm_contribution_recur` ADD CONSTRAINT `FK_civicrm_contribution_recur_payment_processor_id` FOREIGN KEY (`payment_processor_id`) REFERENCES `civicrm_payment_processor` (`id`) ON DELETE SET NULL;
-
--- Pickup payment processor and fill payment processor id in recur contrib table.
-
- 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
- AND processor.is_test = recur.is_test )
- SET recur.payment_processor_id = processor.id;
-
--- done w/ CRM-7115
-
--- CRM-7137
- ALTER TABLE `civicrm_membership`
- 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`
- 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
+++ /dev/null
--- CiviCRM v3.3.3
-{include file='../CRM/Upgrade/3.3.3.msg_template/civicrm_msg_template.tpl'}
-
--- CRM-7172
-UPDATE `civicrm_navigation` SET `permission` = 'access CiviMail,create mailings', `permission_operator` = 'OR' WHERE name = 'New Mailing';
\ No newline at end of file
+++ /dev/null
--- CRM-7455
-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',
- 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}',
- description_{$loc} = '{ts escape="sql"}Grant Report Detail{/ts}'
- WHERE value = 'grant/detail'
- AND name = 'CRM_Report_Form_Grant_Detail';
- {/foreach}
-
-{else}
-
-UPDATE civicrm_option_value
- SET label = '{ts escape="sql"}Grant Report (Detail){/ts}',
- value = 'grant/detail',
- name = 'CRM_Report_Form_Grant_Detail',
- description = '{ts escape="sql"}Grant Report Detail{/ts}'
- WHERE value = 'grant'
- AND name = 'CRM_Report_Form_Grant';
-{/if}
-
-UPDATE civicrm_navigation
- SET label = '{ts escape="sql"}Grant Report (Detail){/ts}',
- name = '{ts escape="sql"}Grant Report (Detail){/ts}'
- WHERE name = '{ts escape="sql"}Grant Report{/ts}';
-
-
-SELECT @domainID := MIN(id) FROM civicrm_domain;
-SELECT @reportlastID := id FROM civicrm_navigation WHERE name = 'Reports';
-SELECT @ogrID := MAX(id) FROM civicrm_option_group WHERE name = 'report_template';
-SELECT @nav_max_weight := MAX(ROUND(weight)) FROM civicrm_navigation WHERE parent_id = @reportlastID;
-SELECT @grantCompId := MAX(id) FROM civicrm_component WHERE name = 'CiviGrant';
-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 )
-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
- ( @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();
-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"}Grant Report (Statistics){/ts}', '{ts}Grant Report (Statistics){/ts}', 'access CiviGrant', '',@reportlastID, '1', NULL, @nav_max_weight+1 );
-
-UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID;
+++ /dev/null
--- CRM-7455
-
-UPDATE civicrm_navigation
- SET name = 'Grant Report Detail'
- WHERE name LIKE 'Grant Report (Detail)';
-
-UPDATE civicrm_navigation
- SET name = 'Grant Report Statistics'
- WHERE name LIKE 'Grant Report (Statistics)' OR name LIKE 'Shows statistics for grants';
-
-SELECT @weight := weight
- FROM civicrm_navigation
- WHERE name LIKE 'Grant Report Detail';
-
-UPDATE civicrm_navigation
- SET weight = @weight
- WHERE name LIKE 'Grant Report Statistics';
\ No newline at end of file
+++ /dev/null
--- CRM-8113 We need a 3.3.7.mysql.tpl file to exist in order for CRM_Upgrade_Incremental_php_ThreeThree::upgrade_3_3_7 to be run
-
--- CRM-8218, contact dashboard changes
-{if $alterContactDashboard}
-ALTER TABLE `civicrm_dashboard` DROP `content`, DROP `created_date`;
-
-ALTER TABLE `civicrm_dashboard_contact` ADD `content` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `weight`, ADD `created_date` DATETIME NULL DEFAULT NULL AFTER `content`;
-{/if}
+++ /dev/null
--- CRM-6696
-ALTER TABLE civicrm_option_value {localize field='description'}MODIFY COLUMN description text{/localize};
-
--- CRM-6442
-SELECT @option_group_id_website := MAX(id) from civicrm_option_group where name = 'website_type';
-SELECT @max_value := MAX(ROUND(value)) from civicrm_option_value where option_group_id = @option_group_id_website;
-SELECT @max_weight := MAX(ROUND(weight)) from civicrm_option_value where option_group_id = @option_group_id_website;;
-
-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);
-
--- CRM-6763
-UPDATE civicrm_option_group
- SET is_reserved = 0
- WHERE civicrm_option_group.name = 'encounter_medium';
-
--- CRM-6814
-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;
-
-INSERT INTO civicrm_option_group
- (name, {localize field='description'}description{/localize}, is_reserved, is_active)
-VALUES
- ('note_privacy', {localize}'Privacy levels for notes'{/localize}, 0, 1);
-
-SELECT @option_group_id_notePrivacy := max(id) from civicrm_option_group where name = 'note_privacy';
-
-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_notePrivacy, {localize}'None'{/localize} , 0, '', NULL, 0, 1, 1, 0, 1, 1, NULL, NULL),
- (@option_group_id_notePrivacy, {localize}'Author Only'{/localize} , 1, '', NULL, 0, 0, 2, 0, 1, 1, NULL, NULL);
-
--- CRM-6748
-UPDATE civicrm_navigation SET url = 'civicrm/admin/contribute/add&reset=1&action=add'
- WHERE civicrm_navigation.name = 'New Contribution Page';
-
--- CRM-6507
-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.';
-
---
--- Campaign upgrade.
---
--- CRM-6232
-CREATE TABLE `civicrm_campaign` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Campaign ID.',
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Name of the Campaign.',
- `title` varchar(255) NULL DEFAULT NULL COMMENT 'Title of the Campaign.',
- `description` text collate utf8_unicode_ci default NULL COMMENT 'Full description of Campaign.',
- `start_date` datetime default NULL COMMENT 'Date and time that Campaign starts.',
- `end_date` datetime default NULL COMMENT 'Date and time that Campaign ends.',
- `campaign_type_id` int unsigned DEFAULT NULL COMMENT 'Campaign Type ID.Implicit FK to civicrm_option_value where option_group = campaign_type',
- `status_id` int unsigned DEFAULT NULL COMMENT 'Campaign status ID.Implicit FK to civicrm_option_value where option_group = campaign_status',
- `external_identifier` int unsigned NULL DEFAULT NULL COMMENT 'Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.',
- `parent_id` int unsigned NULL DEFAULT NULL COMMENT 'Optional parent id for this Campaign.',
- `is_active` boolean NOT NULL DEFAULT 1 COMMENT 'Is this Campaign enabled or disabled/cancelled?',
- `created_id` int unsigned NULL DEFAULT NULL COMMENT 'FK to civicrm_contact, who created this Campaign.',
- `created_date` datetime default NULL COMMENT 'Date and time that Campaign was created.',
- `last_modified_id` int unsigned NULL DEFAULT NULL COMMENT 'FK to civicrm_contact, who recently edited this Campaign.',
- `last_modified_date` datetime default NULL COMMENT 'Date and time that Campaign was edited last time.',
- PRIMARY KEY ( id ),
- INDEX UI_campaign_type_id (campaign_type_id),
- INDEX UI_campaign_status_id (status_id),
- UNIQUE INDEX UI_external_identifier (external_identifier),
- CONSTRAINT FK_civicrm_campaign_created_id FOREIGN KEY (created_id) REFERENCES civicrm_contact(id) ON DELETE SET NULL,
- CONSTRAINT FK_civicrm_campaign_last_modified_id FOREIGN KEY (last_modified_id) REFERENCES civicrm_contact(id) ON DELETE SET NULL,
- CONSTRAINT FK_civicrm_campaign_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL
-)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-
-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.',
- `entity_table` varchar(64) NULL DEFAULT NULL COMMENT 'Name of table where item being referenced is stored.',
- `entity_id` int unsigned DEFAULT NULL COMMENT 'Entity id of referenced table.',
- PRIMARY KEY ( id ),
- CONSTRAINT FK_civicrm_campaign_group_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE CASCADE
-)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-
-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.',
- `activity_type_id` int unsigned DEFAULT NULL COMMENT 'Implicit FK to civicrm_option_value where option_group = activity_type',
- `recontact_interval` text collate utf8_unicode_ci DEFAULT NULL COMMENT 'Recontact intervals for each status.',
- `instructions` text collate utf8_unicode_ci DEFAULT NULL COMMENT 'Script instructions for volunteers to use for the survey.',
- `release_frequency` int unsigned DEFAULT NULL COMMENT 'Number of days for recurrence of release.',
- `max_number_of_contacts` int unsigned DEFAULT NULL COMMENT 'Maximum number of contacts to allow for survey.',
- `default_number_of_contacts` int unsigned DEFAULT NULL COMMENT 'Default number of contacts to allow for survey.',
- `is_active` boolean NOT NULL DEFAULT 1 COMMENT 'Is this survey enabled or disabled/cancelled?',
- `is_default` boolean NOT NULL DEFAULT 0 COMMENT 'Is this default survey?',
- `created_id` int unsigned NULL DEFAULT NULL COMMENT 'FK to civicrm_contact, who created this Survey.',
- `created_date` datetime default NULL COMMENT 'Date and time that Survey was created.',
- `last_modified_id` int unsigned NULL DEFAULT NULL COMMENT 'FK to civicrm_contact, who recently edited this Survey.',
- `last_modified_date` datetime default NULL COMMENT 'Date and time that Survey was edited last time.',
- `result_id` int unsigned NULL DEFAULT NULL COMMENT 'Used to store option group id.',
- PRIMARY KEY ( id ),
- CONSTRAINT FK_civicrm_survey_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE CASCADE,
- INDEX UI_activity_type_id (activity_type_id),
- CONSTRAINT FK_civicrm_survey_created_id FOREIGN KEY (created_id) REFERENCES civicrm_contact(id) ON DELETE SET NULL,
- CONSTRAINT FK_civicrm_survey_last_modified_id FOREIGN KEY (last_modified_id) REFERENCES civicrm_contact(id) ON DELETE SET NULL
-)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-
---add result column to activity table.
-ALTER TABLE `civicrm_activity` ADD `result` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT 'Currently being used to store result for survey activity. FK to option value.' AFTER `original_id`;
-
---insert campaign component.
-INSERT INTO civicrm_component (name, namespace) VALUES ('CiviCampaign' , 'CRM_Campaign' );
-
-INSERT INTO civicrm_option_group
- (`name`, {localize field='description'}description{/localize}, `is_active`)
-VALUES
- ('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';
-SELECT @campaignCompId := max(id) FROM civicrm_component where name = 'CiviCampaign';
-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` )
-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}'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 ),
-
- (@option_group_id_act, {localize}'Survey'{/localize}, (SELECT @max_campaign_act_val := @max_campaign_act_val + 1 ), 'Survey', (SELECT @max_campaign_act_wt := @max_campaign_act_wt + 1 ), 1, @campaignCompId ),
- (@option_group_id_act, {localize}'Canvass'{/localize}, (SELECT @max_campaign_act_val := @max_campaign_act_val + 1 ), 'Canvass', (SELECT @max_campaign_act_wt := @max_campaign_act_wt + 1 ), 1, @campaignCompId ),
- (@option_group_id_act, {localize}'PhoneBank'{/localize}, (SELECT @max_campaign_act_val := @max_campaign_act_val + 1 ), 'PhoneBank', (SELECT @max_campaign_act_wt := @max_campaign_act_wt + 1 ), 1, @campaignCompId ),
- (@option_group_id_act, {localize}'WalkList'{/localize}, (SELECT @max_campaign_act_val := @max_campaign_act_val + 1 ), 'WalkList', (SELECT @max_campaign_act_wt := @max_campaign_act_wt + 1 ), 1, @campaignCompId ),
- (@option_group_id_act, {localize}'Petition'{/localize}, (SELECT @max_campaign_act_val := @max_campaign_act_val + 1 ), 'Petition', (SELECT @max_campaign_act_wt := @max_campaign_act_wt + 1 ), 1, @campaignCompId );
-
---campaign navigation.
-SELECT @domainID := MIN(id) FROM civicrm_domain;
-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' )
- WHERE id = @nav_other_id;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-VALUES
- ( @domainID, NULL, '{ts escape="sql"}Campaigns{/ts}', 'Campaigns', 'interview campaign contacts,release campaign contacts,reserve campaign contacts,manage campaign,administer CiviCampaign', 'OR', @nav_other_id, '1', NULL, (SELECT @nav_other_wt := @nav_other_wt + 1) );
-
-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
- ( @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 ),
- ( @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/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 ),
- ( @domainID, 'civicrm/survey/search&reset=1&op=interview', '{ts escape="sql"}Interview Voters{/ts}', 'Interview Voters', 'administer CiviCampaign,manage campaign,interview campaign contacts', 'OR', @nav_campaign_id, '1', NULL, 6 ),
- ( @domainID, 'civicrm/survey/search&reset=1&op=release', '{ts escape="sql"}Release Voters{/ts}', 'Release Voters', 'administer CiviCampaign,manage campaign,release campaign contacts', 'OR', @nav_campaign_id, '1', NULL, 7 ),
- ( @domainID, 'civicrm/campaign/gotv&reset=1', '{ts escape="sql"}Voter Listing{/ts}', 'Voter Listing', 'administer CiviCampaign,manage campaign', 'OR', @nav_campaign_id, '1', NULL, 8 ),
- ( @domainID, 'civicrm/campaign/vote&reset=1', '{ts escape="sql"}Conduct Survey{/ts}', 'Conduct Survey', 'administer CiviCampaign,manage campaign,reserve campaign contacts,interview campaign contacts', 'OR', @nav_campaign_id, '1', NULL, 9 );
-
---
---Done w/ campaign db upgrade.
---
-
--- CRM-6208
-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
- 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
- COMMENT '3 character string, value from config setting or input via user.';
-
- UPDATE `civicrm_contribution_page` SET `currency` = '{$config->defaultCurrency}';
-
--- CRM-6914
-ALTER TABLE civicrm_option_value MODIFY COLUMN value varchar(512);
-
-INSERT INTO civicrm_option_group
- (`name`, {localize field='description'}description{/localize}, `is_active`)
-VALUES
- ('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` )
-VALUES
- (@option_group_id_dirPref, {localize}'Temporary Files'{/localize} , 'uploadDir' , '', 1, 1, @domainID ),
- (@option_group_id_dirPref, {localize}'Images'{/localize} , 'imageUploadDir' , '', 2, 1, @domainID ),
- (@option_group_id_dirPref, {localize}'Custom Files'{/localize} , 'customFileUploadDir', '', 3, 1, @domainID ),
- (@option_group_id_dirPref, {localize}'Custom Templates'{/localize} , 'customTemplateDir' , '', 4, 1, @domainID ),
- (@option_group_id_dirPref, {localize}'Custom PHP'{/localize} , 'customPHPPathDir' , '', 5, 1, @domainID ),
- (@option_group_id_dirPref, {localize}'Custom Extensions'{/localize}, 'extensionsDir' , '', 6, 1, @domainID ),
-
- (@option_group_id_urlPref, {localize}'CiviCRM Resource URL'{/localize} , 'userFrameworkResourceURL', '', 1, 1, @domainID ),
- (@option_group_id_urlPref, {localize}'Image Upload URL'{/localize} , 'imageUploadURL' , '', 2, 1, @domainID ),
- (@option_group_id_urlPref, {localize}'Custom CiviCRM CSS URL'{/localize}, 'customCSSURL' , '', 3, 1, @domainID );
-
-
--- CRM-6835
-ALTER TABLE civicrm_mailing_job ADD COLUMN `job_type` varchar(255) default NULL;
-ALTER TABLE civicrm_mailing_job ADD COLUMN `parent_id` int(10)unsigned default NULL;
-ALTER TABLE civicrm_mailing_job ADD COLUMN `job_offset` int(20) default 0;
-ALTER TABLE civicrm_mailing_job ADD COLUMN `job_limit` int(20) default 0;
-ALTER TABLE civicrm_mailing_job ADD CONSTRAINT parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_mailing_job (id);
-
--- CRM-6931
-SELECT @ogrID := max(id) from civicrm_option_group where name = 'report_template';
-SELECT @max_weight := max(ROUND(weight)) from civicrm_option_value WHERE option_group_id = @ogrID;
-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 )
-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
- SET color_title = CONCAT( '#', SUBSTRING( color_title, 3 ) ),
- color_button = CONCAT( '#', SUBSTRING( color_button, 3 ) ),
- color_bar = CONCAT( '#', SUBSTRING( color_bar, 3 ) ),
- color_main_text = CONCAT( '#', SUBSTRING( color_main_text, 3 ) ),
- color_main = CONCAT( '#', SUBSTRING( color_main, 3 ) ),
- color_main_bg = CONCAT( '#', SUBSTRING( color_main_bg, 3 ) ),
- 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
-
-ALTER TABLE civicrm_address ADD COLUMN master_id INT(10) unsigned default NULL COMMENT 'FK to Address ID';
-ALTER TABLE civicrm_address ADD CONSTRAINT FK_civicrm_address_master_id FOREIGN KEY (master_id) REFERENCES civicrm_address (id) ON DELETE SET NULL;
-
-UPDATE civicrm_address add1
-INNER JOIN civicrm_contact c1 ON ( c1.id = add1.contact_id AND c1.mail_to_household_id IS NOT NULL )
-INNER JOIN civicrm_address add2 ON ( c1.mail_to_household_id = add2.contact_id AND add2.is_primary = 1 )
-SET add1.master_id = add2.id;
-
-UPDATE civicrm_contact SET mail_to_household_id = NULL;
-
-ALTER TABLE civicrm_contact DROP FOREIGN KEY FK_civicrm_contact_mail_to_household_id;
-ALTER TABLE civicrm_contact DROP mail_to_household_id;
-
--- added shared address profile.
-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),
- (@uf_group_id_sharedAddress, 'city', 0, 0, 2, 'User and User Admin Only', 0, 0, 1, {localize}'City (Home)'{/localize}, 'Contact', {localize}NULL{/localize}, NULL),
- (@uf_group_id_sharedAddress, 'postal_code', 0, 0, 3, 'User and User Admin Only', 0, 0, 1, {localize}'Postal Code (Home)'{/localize}, 'Contact', {localize}NULL{/localize}, NULL),
- (@uf_group_id_sharedAddress, 'country', 0, 0, 4, 'Public Pages and Listings', 0, 1, 1, {localize}'Country (Home)'{/localize}, 'Contact', {localize}NULL{/localize}, NULL),
- (@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` (
- `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.',
- `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',
- `modified_date` datetime default NULL COMMENT 'When was this item created',
- PRIMARY KEY ( `id` ),
- CONSTRAINT FK_civicrm_batch_created_id FOREIGN KEY ( created_id ) REFERENCES civicrm_contact( id ) ON DELETE SET NULL,
- CONSTRAINT FK_civicrm_batch_modified_id FOREIGN KEY ( modified_id ) REFERENCES civicrm_contact( id ) ON DELETE SET NULL
-)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-
-CREATE TABLE `civicrm_entity_batch` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
- `entity_table` varchar(64) DEFAULT NULL COMMENT 'physical tablename for entity being joined to file, e.g. civicrm_contact',
- `entity_id` int(10) unsigned NOT NULL COMMENT 'FK to entity table specified in entity_table column.',
- `batch_id` int(10) unsigned NOT NULL COMMENT 'FK to civicrm_batch',
- PRIMARY KEY ( id ),
- INDEX index_entity ( entity_table, entity_id ),
- UNIQUE INDEX UI_batch_entity ( batch_id, entity_id, entity_table ),
- CONSTRAINT FK_civicrm_entity_batch_batch_id FOREIGN KEY ( batch_id ) REFERENCES civicrm_batch ( id ) ON DELETE CASCADE
- )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
--- CRM-3702
-CREATE TABLE `civicrm_dedupe_exception` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique dedupe exception id.',
- `contact_id1` int(10) unsigned default NULL COMMENT 'FK to Contact ID',
- `contact_id2` int(10) unsigned default NULL COMMENT 'FK to Contact ID',
- PRIMARY KEY ( id ),
- UNIQUE INDEX UI_contact_id1_contact_id2 (`contact_id1`, `contact_id2`),
- CONSTRAINT FK_civicrm_dedupe_exception_contact_id1 FOREIGN KEY (`contact_id1`) REFERENCES `civicrm_contact`(`id`) ON DELETE CASCADE,
- CONSTRAINT FK_civicrm_dedupe_exception_contact_id2 FOREIGN KEY (`contact_id2`) REFERENCES `civicrm_contact`(`id`) ON DELETE CASCADE
-)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
+++ /dev/null
--- CRM-4572
-
-SELECT @uf_group_id_sharedAddress := max(id) from civicrm_uf_group where name = 'shared_address';
-
-UPDATE `civicrm_uf_field`
- SET `is_reserved` = '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
-SELECT @opt_grp_id_frm_email_address := MAX(id) from civicrm_option_group where name = 'from_email_address';
-UPDATE civicrm_option_value
- SET {localize field='label'}label = REPLACE(label, '"<', '" <' ){/localize},
- name = REPLACE( name, '"<', '" <' )
- WHERE option_group_id = @opt_grp_id_frm_email_address;
-
+++ /dev/null
---CRM-6455
-SELECT @domainID := MIN(id) FROM civicrm_domain;
-SELECT @option_group_id_editor := MAX(id) from civicrm_option_group where name = 'wysiwyg_editor';
-SELECT @max_value := MAX(ROUND(value)) from civicrm_option_value where option_group_id = @option_group_id_editor;
-SELECT @max_weight := MAX(ROUND(weight)) from civicrm_option_value where option_group_id = @option_group_id_editor;
-
-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 );
-
--- CRM-6846
-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',
- {localize field='label'}`label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Price field option label'{/localize},
- {localize field='description'}`description` text COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Price field option description.'{/localize},
- `amount` varchar(512) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Price field option amount',
- `count` int(10) unsigned DEFAULT NULL COMMENT 'Number of participants per field option',
- `max_value` int(10) unsigned DEFAULT NULL COMMENT 'Max number of participants per field options',
- `weight` int(11) DEFAULT '1' COMMENT 'Order in which the field options should appear',
- `is_default` tinyint(4) DEFAULT '0' COMMENT 'Is this default price field option',
- `is_active` tinyint(4) DEFAULT '1' COMMENT 'Is this price field option active',
- PRIMARY KEY (`id`),
- CONSTRAINT `FK_civicrm_price_field_value_price_field_id` FOREIGN KEY (`price_field_id`) REFERENCES civicrm_price_field(id) ON DELETE CASCADE )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
---CRM-7003
- ALTER TABLE `civicrm_uf_match` ADD INDEX `I_civicrm_uf_match_uf_id`(`uf_id`);
-
---CRM-4572
-SELECT @uf_group_id_sharedAddress := max(id) from civicrm_uf_group where name = 'shared_address';
-UPDATE civicrm_uf_field
- SET {localize field='help_post'} help_post = NULL {/localize}
-WHERE civicrm_uf_field.uf_group_id = @uf_group_id_sharedAddress AND civicrm_uf_field.field_name= 'country';
-
---CRM-7031
-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`
- 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`
- 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`
- 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`
- 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';
- SELECT @nav_civimailadmin_wt := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_civimailadmin_id;
-
- INSERT INTO civicrm_navigation
- ( 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
- 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' )
- AND permission = 'administer CiviCampaign';
-
--- replace voter w/ respondent.
-UPDATE civicrm_navigation
- SET label = REPLACE(label, 'Voter', 'Respondent' ),
- name = REPLACE(name, 'Voter', 'Respondent' )
- WHERE name IN ( 'Reserve Voters', 'Interview Voters', 'Release Voters' );
-
-
-SELECT @campaignTypeOptGrpID := MAX(id) from civicrm_option_group where name = 'campaign_type';
-
-UPDATE civicrm_option_value
- SET {localize field='label'}label = REPLACE(label, 'Voter', 'Constituent' ){/localize},
- name = REPLACE(name, 'Voter', 'Constituent' )
- WHERE name = 'Voter Engagement'
- AND option_group_id = @campaignTypeOptGrpID;
-
-UPDATE civicrm_navigation
- SET permission = CONCAT( permission, ',release campaign contacts' )
- WHERE name like 'Voter Listing'
- AND permission = 'administer CiviCampaign,manage campaign';
-
-
-{if $multilingual}
- {foreach from=$locales item=loc}
- ALTER TABLE civicrm_batch ADD label_{$loc} varchar(64);
- ALTER TABLE civicrm_batch ADD description_{$loc} text;
-
- UPDATE civicrm_batch SET label_{$loc} = label;
- UPDATE civicrm_batch SET description_{$loc} = description;
- {/foreach}
- ALTER TABLE civicrm_batch DROP label;
- ALTER TABLE civicrm_batch DROP description;
-{/if}
-
--- CRM-7044 (needed for the installs that upgraded to 3.3 from pre-3.2.5)
-UPDATE civicrm_state_province SET name = 'Khomas' WHERE name = 'Khomae';
-
+++ /dev/null
--- CRM-6902, update system workflow message templates
-{include file='../CRM/Upgrade/3.3.beta2.msg_template/civicrm_msg_template.tpl'}
-
--- 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`)
-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),
- (@option_group_id_report, {localize}'{ts escape="sql"}Mail Opened Report{/ts}'{/localize}, 'Mailing/opened', 'CRM_Report_Form_Mailing_Opened', NULL, 0, NULL, 36, {localize}'{ts escape="sql"}Display contacts who opened emails from a mailing{/ts}'{/localize}, 0, 0, 1, @mailCompId, NULL),
- (@option_group_id_report, {localize}'{ts escape="sql"}Mail Clickthrough Report{/ts}'{/localize}, 'Mailing/clicks', 'CRM_Report_Form_Mailing_Clicks', NULL, 0, NULL, 37, {localize}'{ts escape="sql"}Display clicks from each mailing{/ts}'{/localize}, 0, 0, 1, @mailCompId, NULL);
-
-
--- CRM-7031
-
-ALTER TABLE `civicrm_entity_financial_trxn`
- 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_financial_trxn`
- 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_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.';
-
-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.';
-
-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.';
-
-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.';
-
--- CRM-7088
-UPDATE civicrm_navigation
- SET label = 'GOTV (Voter Tracking)'
- WHERE name like 'Voter Listing';
-
---CRM-7067
-ALTER TABLE `civicrm_participant`
- DROP FOREIGN KEY `FK_civicrm_participant_registered_by_id`;
-ALTER TABLE `civicrm_participant`
- ADD CONSTRAINT `FK_civicrm_participant_registered_by_id` FOREIGN KEY (`registered_by_id`) REFERENCES `civicrm_participant` (`id`) ON DELETE SET NULL;
\ No newline at end of file
+++ /dev/null
---CRM-7111 , Unique constraints for table `civicrm_line_item`
-
- ALTER TABLE `civicrm_line_item` ADD UNIQUE INDEX UI_line_item_value (`entity_table`,`entity_id`,`price_field_value_id`,`price_field_id`);
\ No newline at end of file
+++ /dev/null
--- CRM-7901
-
-ALTER TABLE `civicrm_custom_group` CHANGE `extends` `extends` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
-INSERT INTO civicrm_option_group
- (name, {localize field='description'}description{/localize}, is_reserved, is_active)
-VALUES
- ('cg_extend_objects', {localize}'{ts escape="sql"}Objects a custom group extends to{/ts}'{/localize}, 0, 1);
-
-SELECT @option_group_id_cgeo := max(id) from civicrm_option_group where name = 'cg_extend_objects';
-
-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);
+++ /dev/null
--- 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';
-
-UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/activity&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/activity&reset=1&snippet=4';
-UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/myCases&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/myCases&reset=1&snippet=4';
-UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/allCases&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/allCases&reset=1&snippet=4';
-
--- CRM-7956
-DELETE FROM civicrm_navigation where name = 'CiviCampaign';
-DELETE FROM civicrm_navigation where name = 'Survey Types';
-DELETE FROM civicrm_navigation where name = 'Campaign Types';
-DELETE FROM civicrm_navigation where name = 'Campaign Status';
-DELETE FROM civicrm_navigation where name = 'Engagement Index';
-
-SELECT @administerID := MAX(id) FROM civicrm_navigation where name = 'Administer';
-SELECT @adminCampaignWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @administerID;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-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
- ( {$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 ),
- ( {$domainID}, 'civicrm/admin/options/engagement_index&group=engagement_index&reset=1','{ts escape="sql" skip="true"}Engagement Index{/ts}', 'Engagement Index', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 4 );
-
--- CRM-7976
-DELETE FROM civicrm_navigation where name = 'Manage CiviCRM Extensions';
-
-SELECT @customizeID := MAX(id) FROM civicrm_navigation where name = 'Customize';
-SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @customizeID;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-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
- ( 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
- ( @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
-ALTER TABLE civicrm_custom_field MODIFY start_date_years INT(10);
-ALTER TABLE civicrm_custom_field MODIFY end_date_years INT(10);
-
--- CRM-8009
-INSERT IGNORE INTO civicrm_state_province
- (`name`, `abbreviation`, `country_id` )
-VALUES
- ( 'Toledo' , 'TO', '1198' ),
- ( 'Córdoba', 'CO', '1198' );
+++ /dev/null
-
--- Add new column to civicrm_msg_template table for PDF Page Format
-ALTER TABLE civicrm_msg_template ADD COLUMN `pdf_format_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_option_value containing PDF Page Format.';
-ALTER TABLE civicrm_msg_template ADD CONSTRAINT pdf_format_id FOREIGN KEY (pdf_format_id) REFERENCES civicrm_option_value (id) ON DELETE SET NULL;
-
--- Create new option groups
-INSERT INTO civicrm_option_group
- (`name`, {localize field='description'}description{/localize}, `is_reserved`, `is_active`)
-VALUES
- ('paper_size' , {localize}'Paper Size'{/localize} , 0 , 1 ),
- ('pdf_format' , {localize}'PDF Page Format'{/localize} , 0 , 1 ),
- ('label_format', {localize}'Mailing Label Format'{/localize}, 0 , 1 );
-
--- Create navigation menu items
-SELECT @nav_formats := id FROM civicrm_navigation WHERE name = 'Configure';
-SELECT @nav_formats_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_formats;
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-VALUES
- ( {$domainID}, 'civicrm/admin/pdfFormats&reset=1', '{ts escape="sql"}PDF Page Formats{/ts}', 'PDF Page Formats', 'administer CiviCRM', NULL, @nav_formats, '1', NULL, @nav_formats_weight+1 ),
- ( {$domainID}, 'civicrm/admin/labelFormats&reset=1', '{ts escape="sql"}Mailing Label Formats{/ts}','Mailing Label Formats', 'administer CiviCRM', NULL, @nav_formats, '1', NULL, @nav_formats_weight+2 );
-
--- Insert Paper Sizes
-SELECT @option_group_id_paperSize := max(id) from civicrm_option_group where name = 'paper_size';
-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_paperSize, {localize}'Letter'{/localize}, '{literal}{"metric":"in","width":8.5,"height":11}{/literal}', 'letter', NULL, NULL, 1, 1, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Legal'{/localize}, '{literal}{"metric":"in","width":8.5,"height":14}{/literal}', 'legal', NULL, NULL, 0, 2, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Ledger'{/localize}, '{literal}{"metric":"in","width":17,"height":11}{/literal}', 'ledger', NULL, NULL, 0, 3, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Tabloid'{/localize}, '{literal}{"metric":"in","width":11,"height":17}{/literal}', 'tabloid', NULL, NULL, 0, 4, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Executive'{/localize}, '{literal}{"metric":"in","width":7.25,"height":10.5}{/literal}', 'executive', NULL, NULL, 0, 5, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Folio'{/localize}, '{literal}{"metric":"in","width":8.5,"height":13}{/literal}', 'folio', NULL, NULL, 0, 6, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope #9'{/localize}, '{literal}{"metric":"pt","width":638.93,"height":278.93}{/literal}', 'envelope-9', NULL, NULL, 0, 7, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope #10'{/localize}, '{literal}{"metric":"pt","width":684,"height":297}{/literal}', 'envelope-10', NULL, NULL, 0, 8, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope #11'{/localize}, '{literal}{"metric":"pt","width":747,"height":324}{/literal}', 'envelope-11', NULL, NULL, 0, 9, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope #12'{/localize}, '{literal}{"metric":"pt","width":792,"height":342}{/literal}', 'envelope-12', NULL, NULL, 0, 10, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope #14'{/localize}, '{literal}{"metric":"pt","width":828,"height":360}{/literal}', 'envelope-14', NULL, NULL, 0, 11, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO B4'{/localize}, '{literal}{"metric":"pt","width":1000.63,"height":708.66}{/literal}', 'envelope-b4', NULL, NULL, 0, 12, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO B5'{/localize}, '{literal}{"metric":"pt","width":708.66,"height":498.9}{/literal}', 'envelope-b5', NULL, NULL, 0, 13, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO B6'{/localize}, '{literal}{"metric":"pt","width":498.9,"height":354.33}{/literal}', 'envelope-b6', NULL, NULL, 0, 14, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO C3'{/localize}, '{literal}{"metric":"pt","width":1298.27,"height":918.42}{/literal}', 'envelope-c3', NULL, NULL, 0, 15, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO C4'{/localize}, '{literal}{"metric":"pt","width":918.42,"height":649.13}{/literal}', 'envelope-c4', NULL, NULL, 0, 16, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO C5'{/localize}, '{literal}{"metric":"pt","width":649.13,"height":459.21}{/literal}', 'envelope-c5', NULL, NULL, 0, 17, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO C6'{/localize}, '{literal}{"metric":"pt","width":459.21,"height":323.15}{/literal}', 'envelope-c6', NULL, NULL, 0, 18, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'Envelope ISO DL'{/localize}, '{literal}{"metric":"pt","width":623.622,"height":311.811}{/literal}', 'envelope-dl', NULL, NULL, 0, 19, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A0'{/localize}, '{literal}{"metric":"pt","width":2383.94,"height":3370.39}{/literal}', 'a0', NULL, NULL, 0, 20, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A1'{/localize}, '{literal}{"metric":"pt","width":1683.78,"height":2383.94}{/literal}', 'a1', NULL, NULL, 0, 21, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A2'{/localize}, '{literal}{"metric":"pt","width":1190.55,"height":1683.78}{/literal}', 'a2', NULL, NULL, 0, 22, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A3'{/localize}, '{literal}{"metric":"pt","width":841.89,"height":1190.55}{/literal}', 'a3', NULL, NULL, 0, 23, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A4'{/localize}, '{literal}{"metric":"pt","width":595.28,"height":841.89}{/literal}', 'a4', NULL, NULL, 0, 24, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A5'{/localize}, '{literal}{"metric":"pt","width":419.53,"height":595.28}{/literal}', 'a5', NULL, NULL, 0, 25, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A6'{/localize}, '{literal}{"metric":"pt","width":297.64,"height":419.53}{/literal}', 'a6', NULL, NULL, 0, 26, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A7'{/localize}, '{literal}{"metric":"pt","width":209.76,"height":297.64}{/literal}', 'a7', NULL, NULL, 0, 27, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A8'{/localize}, '{literal}{"metric":"pt","width":147.4,"height":209.76}{/literal}', 'a8', NULL, NULL, 0, 28, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A9'{/localize}, '{literal}{"metric":"pt","width":104.88,"height":147.4}{/literal}', 'a9', NULL, NULL, 0, 29, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO A10'{/localize}, '{literal}{"metric":"pt","width":73.7,"height":104.88}{/literal}', 'a10', NULL, NULL, 0, 30, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B0'{/localize}, '{literal}{"metric":"pt","width":2834.65,"height":4008.19}{/literal}', 'b0', NULL, NULL, 0, 31, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B1'{/localize}, '{literal}{"metric":"pt","width":2004.09,"height":2834.65}{/literal}', 'b1', NULL, NULL, 0, 32, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B2'{/localize}, '{literal}{"metric":"pt","width":1417.32,"height":2004.09}{/literal}', 'b2', NULL, NULL, 0, 33, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B3'{/localize}, '{literal}{"metric":"pt","width":1000.63,"height":1417.32}{/literal}', 'b3', NULL, NULL, 0, 34, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B4'{/localize}, '{literal}{"metric":"pt","width":708.66,"height":1000.63}{/literal}', 'b4', NULL, NULL, 0, 35, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B5'{/localize}, '{literal}{"metric":"pt","width":498.9,"height":708.66}{/literal}', 'b5', NULL, NULL, 0, 36, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B6'{/localize}, '{literal}{"metric":"pt","width":354.33,"height":498.9}{/literal}', 'b6', NULL, NULL, 0, 37, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B7'{/localize}, '{literal}{"metric":"pt","width":249.45,"height":354.33}{/literal}', 'b7', NULL, NULL, 0, 38, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B8'{/localize}, '{literal}{"metric":"pt","width":175.75,"height":249.45}{/literal}', 'b8', NULL, NULL, 0, 39, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B9'{/localize}, '{literal}{"metric":"pt","width":124.72,"height":175.75}{/literal}', 'b9', NULL, NULL, 0, 40, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO B10'{/localize}, '{literal}{"metric":"pt","width":87.87,"height":124.72}{/literal}', 'b10', NULL, NULL, 0, 41, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C0'{/localize}, '{literal}{"metric":"pt","width":2599.37,"height":3676.54}{/literal}', 'c0', NULL, NULL, 0, 42, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C1'{/localize}, '{literal}{"metric":"pt","width":1836.85,"height":2599.37}{/literal}', 'c1', NULL, NULL, 0, 43, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C2'{/localize}, '{literal}{"metric":"pt","width":1298.27,"height":1836.85}{/literal}', 'c2', NULL, NULL, 0, 44, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C3'{/localize}, '{literal}{"metric":"pt","width":918.43,"height":1298.27}{/literal}', 'c3', NULL, NULL, 0, 45, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C4'{/localize}, '{literal}{"metric":"pt","width":649.13,"height":918.43}{/literal}', 'c4', NULL, NULL, 0, 46, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C5'{/localize}, '{literal}{"metric":"pt","width":459.21,"height":649.13}{/literal}', 'c5', NULL, NULL, 0, 47, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C6'{/localize}, '{literal}{"metric":"pt","width":323.15,"height":459.21}{/literal}', 'c6', NULL, NULL, 0, 48, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C7'{/localize}, '{literal}{"metric":"pt","width":229.61,"height":323.15}{/literal}', 'c7', NULL, NULL, 0, 49, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C8'{/localize}, '{literal}{"metric":"pt","width":161.57,"height":229.61}{/literal}', 'c8', NULL, NULL, 0, 50, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C9'{/localize}, '{literal}{"metric":"pt","width":113.39,"height":161.57}{/literal}', 'c9', NULL, NULL, 0, 51, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO C10'{/localize}, '{literal}{"metric":"pt","width":79.37,"height":113.39}{/literal}', 'c10', NULL, NULL, 0, 52, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO RA0'{/localize}, '{literal}{"metric":"pt","width":2437.8,"height":3458.27}{/literal}', 'ra0', NULL, NULL, 0, 53, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO RA1'{/localize}, '{literal}{"metric":"pt","width":1729.13,"height":2437.8}{/literal}', 'ra1', NULL, NULL, 0, 54, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO RA2'{/localize}, '{literal}{"metric":"pt","width":1218.9,"height":1729.13}{/literal}', 'ra2', NULL, NULL, 0, 55, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO RA3'{/localize}, '{literal}{"metric":"pt","width":864.57,"height":1218.9}{/literal}', 'ra3', NULL, NULL, 0, 56, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO RA4'{/localize}, '{literal}{"metric":"pt","width":609.45,"height":864.57}{/literal}', 'ra4', NULL, NULL, 0, 57, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO SRA0'{/localize}, '{literal}{"metric":"pt","width":2551.18,"height":3628.35}{/literal}', 'sra0', NULL, NULL, 0, 58, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO SRA1'{/localize}, '{literal}{"metric":"pt","width":1814.17,"height":2551.18}{/literal}', 'sra1', NULL, NULL, 0, 59, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO SRA2'{/localize}, '{literal}{"metric":"pt","width":1275.59,"height":1814.17}{/literal}', 'sra2', NULL, NULL, 0, 60, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO SRA3'{/localize}, '{literal}{"metric":"pt","width":907.09,"height":1275.59}{/literal}', 'sra3', NULL, NULL, 0, 61, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_paperSize, {localize}'ISO SRA4'{/localize}, '{literal}{"metric":"pt","width":637.8,"height":907.09}{/literal}', 'sra4', NULL, NULL, 0, 62, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL);
-
--- 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`)
-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 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);
-
-
--- CRM-8133, add entries for assignee contact for activities of type Membership Renewal Reminder
-SELECT @option_value_membership_reminder := value FROM civicrm_option_value v, civicrm_option_group g WHERE v.option_group_id = g.id AND g.name = 'activity_type' AND v.name = 'Membership Renewal Reminder';
-
-INSERT INTO civicrm_activity_assignment ( activity_id, assignee_contact_id ) SELECT ca.id, ca.source_contact_id FROM civicrm_activity ca LEFT JOIN civicrm_activity_assignment cas ON ( cas.activity_id = ca.id ) WHERE ca.activity_type_id = @option_value_membership_reminder AND cas.id IS NULL AND ca.source_contact_id IS NOT NULL;
+++ /dev/null
--- CRM-6134
-
-{include file='../CRM/Upgrade/3.4.3.msg_template/civicrm_msg_template.tpl'}
-
---added on behalf of organization profile
-
-INSERT INTO civicrm_uf_group
- ( name, group_type, {localize field='title'}title{/localize}, is_reserved )
-
-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
- ( is_active, module, entity_table, entity_id, weight, uf_group_id )
-
-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,
- {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,
- {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,
- {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,
- {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,
- {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,
- {localize}'State/Province'{/localize}, 'Contact', {localize}NULL{/localize}, NULL );
-
--- CRM-8150
-CREATE TABLE IF NOT EXISTS `civicrm_action_mapping` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `entity` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity for which the reminder is created',
- `entity_value` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity value',
- `entity_value_label` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity value label',
- `entity_status` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity status',
- `entity_status_label` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity status label',
- `entity_date_start` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity date',
- `entity_date_end` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity date',
- `entity_recipient` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity recipient',
- PRIMARY KEY (`id`)
-) 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)
-VALUES
- ('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,
- `name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Name of the action(reminder)',
- `title` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Title of the action(reminder)',
- `recipient` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Recipient',
- `entity_value` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity value',
- `entity_status` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity status',
- `start_action_offset` int(10) unsigned DEFAULT NULL COMMENT 'Reminder Interval.',
- `start_action_unit` enum('hour','day','week','month','year') COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Time units for reminder.',
- `start_action_condition` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Reminder Action',
- `start_action_date` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity date',
- `is_repeat` tinyint(4) DEFAULT '0',
- `repetition_frequency_unit` enum('hour','day','week','month','year') COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Time units for repetition of reminder.',
- `repetition_frequency_interval` int(10) unsigned DEFAULT NULL COMMENT 'Time interval for repeating the reminder.',
- `end_frequency_unit` enum('hour','day','week','month','year') COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Time units till repetition of reminder.',
- `end_frequency_interval` int(10) unsigned DEFAULT NULL COMMENT 'Time interval till repeating the reminder.',
- `end_action` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Reminder Action till repeating the reminder.',
- `end_date` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Entity end date',
- `is_active` tinyint(4) DEFAULT '1' COMMENT 'Is this option active?',
- `recipient_manual` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Contact IDs to which reminder should be sent.',
- `body_text` longtext COLLATE utf8_unicode_ci COMMENT 'Body of the mailing in text format.',
- `body_html` longtext COLLATE utf8_unicode_ci COMMENT 'Body of the mailing in html format.',
- `subject` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Subject of mailing',
- `record_activity` tinyint(4) DEFAULT NULL COMMENT 'Record Activity for this reminder?',
- `mapping_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to mapping which is being used by this reminder',
- `group_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Group',
- `msg_template_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to the message template.',
- PRIMARY KEY (`id`),
- CONSTRAINT `FK_civicrm_action_schedule_mapping_id` FOREIGN KEY (`mapping_id`) REFERENCES civicrm_action_mapping(id) ON DELETE SET NULL,
- CONSTRAINT `FK_civicrm_action_schedule_group_id` FOREIGN KEY (`group_id`) REFERENCES civicrm_group(id) ON DELETE SET NULL,
- CONSTRAINT `FK_civicrm_action_schedule_msg_template_id` FOREIGN KEY (`msg_template_id`) REFERENCES `civicrm_msg_template` (`id`) ON DELETE SET NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-
-INSERT INTO civicrm_option_group
- (name, {localize field='description'}description{/localize}, is_reserved, is_active)
-VALUES
- ('activity_contacts', {localize}'{ts escape="sql"}Activity Contacts{/ts}'{/localize}, 0, 1);
-
-SELECT @option_group_id_aco := max(id) from civicrm_option_group where name = 'activity_contacts';
-SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
-SELECT @act_value := MAX(ROUND(value)) FROM civicrm_option_value WHERE option_group_id = @option_group_id_act;
-SELECT @act_weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_act;
-
--- 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)
-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),
- (@option_group_id_aco, {localize}'{ts escape="sql"}Activity Targets{/ts}'{/localize}, 3, 'Activity Targets', NULL, 0, NULL, 3, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_adv_search_opts, {localize}'{ts escape="sql"}Mailing{/ts}'{/localize}, '19', 'CiviMail', NULL, 0, NULL, 21, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL),
- (@option_group_id_act, {localize}'{ts escape="sql"}Reminder Sent{/ts}'{/localize}, @act_value+1, 'Reminder Sent', NULL, 0, NULL, @act_weight+1, {localize}NULL{/localize}, 0, 0, 1, NULL, NULL);
-
-SELECT @domainID := min(id) FROM civicrm_domain;
-SELECT @configureID := max(id) FROM civicrm_navigation WHERE name = 'Configure';
-SELECT @nav_c_wt := max(weight) from civicrm_navigation WHERE parent_id = @configureID;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-VALUES
- ( @domainID, 'civicrm/admin/scheduleReminders&reset=1', '{ts escape="sql" skip="true"}Schedule Reminders{/ts}', 'Schedule Reminders', 'administer CiviCRM', '', @configureID, '1', NULL, @nav_c_wt );
-
--- CRM-8148, rename uf field 'activity_status' to 'activity_status_id'
-UPDATE civicrm_uf_field SET field_name = 'activity_type_id' WHERE field_name= 'activity_type';
-
--- CRM-7988 allow negative start and end date offsets for custom fields
-ALTER TABLE civicrm_custom_field MODIFY start_date_years INT(10);
-ALTER TABLE civicrm_custom_field MODIFY end_date_years INT(10);
-
--- CRM-8146 Supply names for existing dupe matching rules (now that name is required)
-UPDATE civicrm_dedupe_rule_group
-SET name = CONCAT(contact_type, '-', level, '-', id)
-WHERE name IS NULL;
+++ /dev/null
--- CRM-8248
-{include file='../CRM/Upgrade/3.4.5.msg_template/civicrm_msg_template.tpl'}
-
--- CRM-8348
-
-CREATE TABLE IF NOT EXISTS civicrm_action_log (
- id int UNSIGNED NOT NULL AUTO_INCREMENT,
- contact_id int UNSIGNED NULL DEFAULT NULL COMMENT 'FK to Contact ID',
- entity_id int UNSIGNED NOT NULL COMMENT 'FK to id of the entity that the action was performed on. Pseudo - FK.',
- entity_table varchar(255) COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'name of the entity table for the above id, e.g. civicrm_activity, civicrm_participant',
- action_schedule_id int UNSIGNED NOT NULL COMMENT 'FK to the action schedule that this action originated from.',
- action_date_time DATETIME NULL DEFAULT NULL COMMENT 'date time that the action was performed on.',
- is_error TINYINT( 4 ) NULL DEFAULT '0' COMMENT 'Was there any error sending the reminder?',
- message TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Description / text in case there was an error encountered.',
- repetition_number INT( 10 ) UNSIGNED NULL COMMENT 'Keeps track of the sequence number of this repetition.',
- PRIMARY KEY ( id ),
- CONSTRAINT FK_civicrm_action_log_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE,
- CONSTRAINT FK_civicrm_action_log_action_schedule_id FOREIGN KEY (action_schedule_id) REFERENCES civicrm_action_schedule(id) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
-
--- CRM-8370
-ALTER TABLE `civicrm_action_log` CHANGE `repetition_number` `repetition_number` INT( 10 ) UNSIGNED NULL COMMENT 'Keeps track of the sequence number of this repetition.';
-
--- CRM-8085
-UPDATE civicrm_mailing SET domain_id = {$domainID} WHERE domain_id IS NULL;
-
--- CRM-8402, CRM-8679
-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
-DROP INDEX index_entity;
-
-ALTER TABLE civicrm_entity_tag
-ADD UNIQUE INDEX UI_entity_id_entity_table_tag_id( entity_table, entity_id, tag_id );
-
--- CRM-8513
-
-SELECT @report_template_gid := MAX(id) FROM civicrm_option_group WHERE name = 'report_template';
-
-{if $multilingual}
- {foreach from=$locales item=locale}
- UPDATE civicrm_option_value SET label_{$locale} = 'Pledge Report (Detail)', description_{$locale} = 'Pledge Report' WHERE option_group_id = @report_template_gid AND value = 'pledge/summary';
- {/foreach}
-{else}
- UPDATE civicrm_option_value SET label = 'Pledge Report (Detail)', description = 'Pledge Report' WHERE option_group_id = @report_template_gid AND value = 'pledge/summary';
-{/if}
-
-UPDATE civicrm_option_value SET name = 'CRM_Report_Form_Pledge_Detail', value = 'pledge/detail' WHERE option_group_id = @report_template_gid AND value = 'pledge/summary';
-
-UPDATE civicrm_report_instance SET report_id = 'pledge/detail' WHERE report_id = 'pledge/summary';
-
-SELECT @weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @report_template_gid;
-SELECT @pledgeCompId := MAX(id) FROM civicrm_component where name = 'CiviPledge';
-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) VALUES
- (@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'
-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'
-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'
-WHERE name = 'Payment_Express';
-
-
--- CRM-8125
-SELECT @option_group_id_languages := MAX(id) FROM civicrm_option_group WHERE name = 'languages';
-SELECT @languages_max_weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_languages;
-
-{if $multilingual}
- {foreach from=$locales item=locale}
- UPDATE civicrm_option_value SET label_{$locale} = '{ts escape="sql"}Persian (Iran){/ts}' WHERE value = 'fa' AND option_group_id = @option_group_id_languages;
- {/foreach}
-{else}
- UPDATE civicrm_option_value SET label = '{ts escape="sql"}Persian (Iran){/ts}' WHERE value = 'fa' AND option_group_id = @option_group_id_languages;
-{/if}
-
-INSERT INTO civicrm_option_value
- (option_group_id, is_default, is_active, name, value, {localize field='label'}label{/localize}, weight)
-VALUES
-(@option_group_id_languages, 0, 1, 'de_CH', 'de', {localize}'{ts escape="sql"}German (Swiss){/ts}'{/localize}, @weight := @languages_max_weight + 1),
-(@option_group_id_languages, 0, 1, 'es_PR', 'es', {localize}'{ts escape="sql"}Spanish; Castilian (Puerto Rico){/ts}'{/localize}, @weight := @languages_max_weight + 2);
-
--- CRM-8218, contact dashboard changes
-{if $alterContactDashboard}
- ALTER TABLE `civicrm_dashboard` DROP `content`, DROP `created_date`;
- ALTER TABLE `civicrm_dashboard_contact` ADD `content` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `weight`, ADD `created_date` DATETIME NULL DEFAULT NULL AFTER `content`;
-{/if}
+++ /dev/null
--- CRM-8483
-{include file='../CRM/Upgrade/3.4.6.msg_template/civicrm_msg_template.tpl'}
-
--- CRM-8619
-
-SELECT @option_group_id_languages := MAX( id ) FROM civicrm_option_group WHERE name = 'languages';
-
-DELETE FROM civicrm_option_value WHERE option_group_id = @option_group_id_languages AND name = 'de_CH';
-DELETE FROM civicrm_option_value WHERE option_group_id = @option_group_id_languages AND name = 'es_PR';
-
-SELECT @languages_max_weight := MAX( weight ) FROM civicrm_option_value WHERE option_group_id = @option_group_id_languages;
-
-INSERT INTO civicrm_option_value
- (option_group_id, is_default, is_active, name, value, {localize field='label'}label{/localize}, weight)
-VALUES
-(@option_group_id_languages, 0, 1, 'de_CH', 'de', {localize}'{ts escape="sql"}German (Swiss){/ts}'{/localize}, @weight := @languages_max_weight + 1),
-(@option_group_id_languages, 0, 1, 'es_PR', 'es', {localize}'{ts escape="sql"}Spanish; Castilian (Puerto Rico){/ts}'{/localize}, @weight := @languages_max_weight + 2);
-
--- CRM-8653
-UPDATE civicrm_dashboard SET url = 'civicrm/report/instance/3&reset=1§ion=2&snippet=4&context=dashlet' WHERE url = 'civicrm/report/instance/3&reset=1§ion=2&snippet=4';
-
--- CRM-8654
-ALTER TABLE `civicrm_dashboard_contact` CHANGE `content` `content` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'dashlet content';
-
--- CRM-8664
-SELECT @ogrID := max(id) from civicrm_option_group where name = 'report_template';
-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 )
-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);
-
--- CRM-8728
-SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
-{if $bulkEmailActivityType}
- -- make sure Bulk Email is active and resereved
- UPDATE civicrm_option_value SET is_reserved = 1, is_active = 1 WHERE option_group_id=@option_group_id_activity_type AND name='Bulk Email';
-{else}
- -- insert activity type Bulk Email
- SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
- SELECT @max_wt := max(weight) from civicrm_option_value where option_group_id=@option_group_id_activity_type;
- INSERT INTO civicrm_option_value
- (option_group_id, {localize field='label'}label{/localize}, {localize field='description'}description{/localize}, value, name, weight, filter, is_reserved, component_id)
- VALUES
- (@option_group_id_activity_type, {localize}'Bulk Email'{/localize}, {localize}'Bulk Email Sent.'{/localize}, (@max_val+1), 'Bulk Email', (SELECT @max_wt := @max_wt+1), 1, 1, NULL);
-{/if}
-
--- CRM-8859
-ALTER TABLE `civicrm_prevnext_cache`
- ADD INDEX index_all ( cacheKey, entity_id1, entity_id2, entity_table );
-
--- CRM-8483
-
-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;
-
-SELECT @customizeID := MAX(id) FROM civicrm_navigation where name = 'Memberships';
-SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @customizeID;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-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 );
-
-SELECT @customizeID := MAX(id) FROM civicrm_navigation where name = 'CiviMember';
-SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @customizeID;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-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
-SET url_recur_default = 'https://checkout.google.com/',
- url_recur_test_default = 'https://sandbox.google.com/checkout/',
- is_recur = 1
-WHERE name = 'Google_Checkout';
-
-UPDATE civicrm_payment_processor
- SET is_recur = 1,
- url_recur = 'https://checkout.google.com/'
- WHERE payment_processor_type = 'Google_Checkout' AND is_test = 0;
-
-UPDATE civicrm_payment_processor
- SET is_recur = 1,
- url_recur = 'https://sandbox.google.com/checkout/'
- WHERE payment_processor_type = 'Google_Checkout' AND is_test = 1;
+++ /dev/null
--- CRM-8930
-{include file='../CRM/Upgrade/3.4.7.msg_template/civicrm_msg_template.tpl'}
+++ /dev/null
--- CRM-7346
-ALTER TABLE `civicrm_campaign` ADD `goal_general` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci default NULL NULL COMMENT 'General goals for Campaign.';
-ALTER TABLE `civicrm_campaign` ADD `goal_revenue` DECIMAL( 20, 2 ) default NULL NULL COMMENT 'The target revenue for this campaign.';
-
--- CRM-7345
-ALTER TABLE `civicrm_custom_group` CHANGE `extends` `extends` ENUM( 'Contact', 'Individual', 'Household', 'Organization', 'Location', 'Address', 'Contribution', 'Activity', 'Relationship', 'Group', 'Membership', 'Participant', 'Event', 'Grant', 'Pledge', 'Case', 'Campaign' ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
--- CRM-7362
-ALTER TABLE `civicrm_contribution`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which this contribution has been triggered.',
-ADD CONSTRAINT FK_civicrm_contribution_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL;
-
-ALTER TABLE `civicrm_contribution_page`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which we are collecting contributions with this page.',
-ADD CONSTRAINT FK_civicrm_contribution_page_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL;
-
-ALTER TABLE `civicrm_membership`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which this membership is attached.',
-ADD CONSTRAINT FK_civicrm_membership_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL;
-
-ALTER TABLE `civicrm_pledge`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which this pledge has been initiated.',
-ADD CONSTRAINT FK_civicrm_pledge_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL;
-
-ALTER TABLE `civicrm_activity`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which this activity has been triggered.',
-ADD CONSTRAINT FK_civicrm_activity_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL;
-
-ALTER TABLE `civicrm_participant`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which this participant has been registered.',
-ADD CONSTRAINT FK_civicrm_participant_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL;
-
-ALTER TABLE `civicrm_event`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which this event has been created.',
-ADD CONSTRAINT FK_civicrm_event_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL;
-
-ALTER TABLE `civicrm_mailing`
-ADD `campaign_id` int(10) unsigned default NULL COMMENT 'The campaign for which this mailing has been initiated.',
-ADD CONSTRAINT FK_civicrm_mailing_campaign_id FOREIGN KEY (campaign_id) REFERENCES civicrm_campaign(id) ON DELETE SET NULL,
-ADD `domain_id` int(10) unsigned default NULL COMMENT 'Which site is this mailing for.' AFTER id,
-ADD CONSTRAINT FK_civicrm_mailing_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id) ON DELETE SET NULL;
-
--- done w/ CRM-7345
-
--- CRM-7223
-CREATE TABLE civicrm_mailing_recipients (
- id int unsigned NOT NULL AUTO_INCREMENT ,
- mailing_id int unsigned NOT NULL COMMENT 'The ID of the mailing this Job will send.',
- 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
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- CRM-7352 add logging report templates
-SELECT @option_group_id_report := MAX(id) FROM civicrm_option_group WHERE name = 'report_template';
-SELECT @weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_report;
-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) VALUES
- (@option_group_id_report, {localize}'Contribute Logging Report (Summary)'{/localize}, 'logging/contribute/summary', 'CRM_Report_Form_Contribute_LoggingSummary', @weight := @weight + 1, {localize}'Contribution modification report for the logging infrastructure (summary).'{/localize}, 0, @contributeCompId),
- (@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)
-ON DELETE SET NULL;
-
-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
-SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
-SELECT @weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_act;
-SELECT @value := MAX(ROUND(value)) FROM civicrm_option_value WHERE option_group_id = @option_group_id_act;
-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, weight, {localize field='description'}description{/localize}, is_active, component_id) VALUES
- (@option_group_id_act, {localize}'Add Client To Case'{/localize}, @value, 'Add Client To Case', @weight, {localize}NULL{/localize}, 1, @caseCompId );
-
--- CRM-7317
-CREATE TABLE civicrm_prevnext_cache (
- id int(10) unsigned NOT NULL AUTO_INCREMENT,
- entity_table varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'physical tablename for entity being joined to discount, e.g. civicrm_event',
- entity_id1 int(10) unsigned NOT NULL COMMENT 'FK to entity table specified in entity_table column.',
- entity_id2 int(10) unsigned NOT NULL COMMENT 'FK to entity table specified in entity_table column.',
- cacheKey varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unique path name for cache element of the searched item',
- data longtext COLLATE utf8_unicode_ci COMMENT 'cached snapshot of the serialized data',
- PRIMARY KEY ( id )
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- CRM-7489
-ALTER TABLE `civicrm_tag`
-ADD `created_date` DATETIME NULL DEFAULT NULL COMMENT 'Date and time that tag was created.',
-ADD `created_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_contact, who created this tag',
-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
-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'
- AND value.name = 'CRM_Report_Form_Walklist';
-
-SELECT @reportlastID := MAX(id) FROM civicrm_navigation where name = 'Reports';
-SELECT @campaignCompId := MAX(id) FROM civicrm_component where name = 'CiviCampaign';
-SELECT @reportOptGrpId := MAX(id) FROM civicrm_option_group WHERE name = 'report_template';
-SELECT @reportOptValMaxWt := MAX(ROUND(weight)) FROM civicrm_option_value WHERE option_group_id = @reportOptGrpId;
-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 )
-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
- ( {$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 )
-VALUES
- ( {$domainID}, CONCAT('civicrm/report/instance/', @instanceID,'&reset=1'), '{ts escape="sql"}Walk List Survey Report{/ts}', 'Walk List Survey Report', 'administer CiviCampaign,manage campaign,interview campaign contacts', 'OR', @reportlastID, '1', NULL, @nav_max_weight+1 );
-UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID;
-
+++ /dev/null
--- CRM-7494
--- update 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
- SET title = 'Survey Report (Detail)',
- description = 'Detailed report for canvassing, phone-banking, walk lists or other surveys.'
- WHERE report_id LIKE 'survey/detail';
-
--- update report template option values.
-{if $multilingual}
-
- {foreach from=$locales item=loc}
-
- UPDATE civicrm_option_value val
-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'
- AND grp.name = 'report_template';
-
- {/foreach}
-
-{else}
-
- UPDATE civicrm_option_value val
-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'
- AND grp.name = 'report_template';
-
-{/if}
-
--- get rid of standalone tables CRM-7672
-DROP TABLE IF EXISTS civicrm_openid_associations;
-DROP TABLE IF EXISTS civicrm_openid_nonces;
-
--- insert 5395 Logo style event name badge CRM-7695
- 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 )
- 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 )
- 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}
+++ /dev/null
--- CRM-7743
-SELECT @option_group_id_languages := MAX(id) FROM civicrm_option_group WHERE name = 'languages';
-UPDATE civicrm_option_value SET name = 'ce_RU' WHERE value = 'ce' AND option_group_id = @option_group_id_languages;
-
--- CRM-7750
-SELECT @option_group_id_report := MAX(id) FROM civicrm_option_group WHERE name = 'report_template';
-SELECT @weight := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_report;
-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)
- 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 );
-
--- CRM-7775
-ALTER TABLE `civicrm_activity`
-ADD `engagement_level` int(10) unsigned default NULL COMMENT 'Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.';
-
-
-{if $renameColumnVisibility}
- ALTER TABLE `civicrm_mailing` CHANGE `visibilty` `visibility` ENUM( 'User and User Admin Only', 'Public Pages' ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'User and User Admin Only' COMMENT 'In what context(s) is the mailing contents visible (online viewing)';
-{/if}
-
--- CRM-7453
- UPDATE `civicrm_navigation`
- SET `url` = 'civicrm/activity/email/add&atype=3&action=add&reset=1&context=standalone' WHERE `name` = 'New Email';
-
+++ /dev/null
--- CRM-7646
-SELECT @option_group_id_pi := max(id) from civicrm_option_group where name = 'payment_instrument';
-UPDATE civicrm_option_value
- SET is_reserved = 1
- WHERE option_group_id = @option_group_id_pi AND name = 'Check';
-UPDATE civicrm_option_value
- SET is_reserved = 1
- WHERE option_group_id = @option_group_id_pi AND name = 'Debit Card';
-
--- CRM-7798
-UPDATE civicrm_uf_field SET field_name = 'participant_status' WHERE field_name = 'participant_status_id';
-
-UPDATE civicrm_uf_field SET field_name = 'participant_role' WHERE field_name = 'participant_role_id';
-
-UPDATE civicrm_uf_field SET field_name = 'membership_type' WHERE field_name = 'membership_type_id';
-
-UPDATE civicrm_uf_field SET field_name = 'membership_status' WHERE field_name = 'status_id';
-
-UPDATE civicrm_uf_field SET field_name = 'contribution_type' WHERE field_name = 'contribution_type_id';
-
+++ /dev/null
--- CRM-7817
-{include file='../CRM/Upgrade/3.4.beta2.msg_template/civicrm_msg_template.tpl'}
-
-
--- CRM-7801
-SELECT @domain_id := min(id) FROM civicrm_domain;
-SELECT @nav_case := id FROM civicrm_navigation WHERE name = 'CiviCase';
-SELECT @nav_case_weight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_case;
-
-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 );
-
+++ /dev/null
-
--- CRM-7871
-INSERT INTO civicrm_option_group
- (name, {localize field='description'}description{/localize}, is_reserved, is_active)
-VALUES
- ('engagement_index', {localize}'{ts escape="sql"}Engagement Levels{/ts}'{/localize}, 0, 1);
-
-SELECT @optGrpIdEngagementIndex := max(id) from civicrm_option_group where name = 'engagement_index';
-
-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),
- (@optGrpIdEngagementIndex, {localize}'{ts escape="sql"}2{/ts}'{/localize}, 2, 2, NULL, 0, NULL, 2, 0, 0, 1, NULL, NULL),
- (@optGrpIdEngagementIndex, {localize}'{ts escape="sql"}3{/ts}'{/localize}, 3, 3, NULL, 0, NULL, 3, 0, 0, 1, NULL, NULL),
- (@optGrpIdEngagementIndex, {localize}'{ts escape="sql"}4{/ts}'{/localize}, 4, 4, NULL, 0, NULL, 4, 0, 0, 1, NULL, NULL),
- (@optGrpIdEngagementIndex, {localize}'{ts escape="sql"}5{/ts}'{/localize}, 5, 5, NULL, 0, NULL, 5, 0, 0, 1, NULL, NULL);
-
--- insert navigation link.
--- NOTE: code below will not work due to spaces in increment statement for weight
--- and because CiviCampaign admin links were not inserted during 3.3 upgrade
--- fixing both issues in 3.4.1 upgrade: CRM-7956
-
-SELECT @civiCampaignNavId := MAX(id) FROM civicrm_navigation where name = 'CiviCampaign';
-SELECT @cmapaignNavMaxWeight := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @civiCampaignNavId;
-
-INSERT INTO civicrm_navigation
- ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
-VALUES
- ( {$domainID}, 'civicrm/admin/options/engagement_index&group=engagement_index&reset=1', '{ts escape="sql"}Engagement Index{/ts}', 'Engagement Index', 'administer CiviCampaign', '', @civiCampaignNavId, 1, NULL, @cmapaignNavMaxWeight + 1 );
-
CRM_Core_Resources::singleton()->flushStrings()->resetCacheCode();
CRM_Core_Menu::store();
- // This could be removed in later rev
- if ($currentVer == '2.1.6') {
- $config = CRM_Core_Config::singleton();
- // also cleanup the templates_c directory
- $config->cleanupCaches();
- }
- else {
- $config = CRM_Core_Config::singleton();
- // cleanup only the templates_c directory
- $config->cleanup(1, FALSE);
- }
- // end of hack
+ // cleanup only the templates_c directory
+ $config->cleanup(1, FALSE);
$preUpgradeMessage = NULL;
$upgrade->setPreUpgradeMessage($preUpgradeMessage, $currentVer, $latestVer);
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * Clean up the exisiting tables
--- *
--- *******************************************************/
-DROP TABLE IF EXISTS civicrm_mapping_field;
-DROP TABLE IF EXISTS civicrm_mapping;
-DROP TABLE IF EXISTS civicrm_individual_suffix;
-DROP TABLE IF EXISTS civicrm_individual_prefix;
-DROP TABLE IF EXISTS civicrm_gender;
-
--- /*******************************************************
--- *
--- * Ensure we're working with InnoDBs for foreign keys' sake
--- *
--- *******************************************************/
-ALTER TABLE civicrm_domain TYPE=InnoDB;
-ALTER TABLE civicrm_location_type TYPE=InnoDB;
-ALTER TABLE civicrm_relationship_type TYPE=InnoDB;
-
--- /*******************************************************
--- *
--- * civicrm_mapping
--- *
--- * Store field mappings in import or export for reuse
--- *
--- *******************************************************/
-CREATE TABLE civicrm_mapping (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Mapping ID',
- domain_id int unsigned NOT NULL COMMENT 'Domain to which this mapping belongs',
- name varchar(64) COMMENT 'Name of Mapping',
- description varchar(255) COMMENT 'Description of Mapping.',
- mapping_type enum('Export', 'Import') COMMENT 'Type of Mapping.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name(
- name
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_individual_prefix
--- *
--- *******************************************************/
-CREATE TABLE civicrm_individual_prefix (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Individual Prefix ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this individual prefix.',
- name varchar(64) COMMENT 'Individual Prefix Name.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls Individual Prefix order in the select box.',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_individual_suffix
--- *
--- *******************************************************/
-CREATE TABLE civicrm_individual_suffix (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Individual Suffix ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this individual suffix.',
- name varchar(64) COMMENT 'Individual Suffix Name.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls Individual Suffix order in the select box.',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_mapping_field
--- *
--- * Individual field mappings for Mapping
--- *
--- *******************************************************/
-CREATE TABLE civicrm_mapping_field (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Mapping Field ID',
- mapping_id int unsigned NOT NULL COMMENT 'Mapping to which this field belongs',
- name varchar(64) COMMENT 'Mapping field key',
- contact_type varchar(64) COMMENT 'Contact Type in mapping',
- column_number int unsigned NOT NULL COMMENT 'Column number for mapping set',
- location_type_id int unsigned COMMENT 'Location type of this mapping, if required',
- phone_type varchar(64) COMMENT 'Phone type, if required',
- relationship_type_id int unsigned COMMENT 'Relationship type, if required'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_mapping_id ( mapping_id ) ,
- FOREIGN KEY (mapping_id) REFERENCES civicrm_mapping(id)
-, INDEX FKEY_location_type_id ( location_type_id ) ,
- FOREIGN KEY (location_type_id) REFERENCES civicrm_location_type(id)
-, INDEX FKEY_relationship_type_id ( relationship_type_id ) ,
- FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_gender
--- *
--- *******************************************************/
-CREATE TABLE civicrm_gender (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Gender ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this gender.',
- name varchar(64) COMMENT 'Gender Name.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls Gender order in the select box.',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_uf_group ADD help_pre text COMMENT 'Description and/or help text to display before fields in form.';
-
-ALTER TABLE civicrm_uf_group ADD help_post text COMMENT 'Description and/or help text to display after fields in form.';
-
-ALTER TABLE civicrm_uf_group ADD weight int NOT NULL DEFAULT 1 COMMENT 'Controls display order when multiple user framework groups are setup for concurrent display.';
-
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_field Table Structure
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_uf_field ADD in_selector tinyint DEFAULT 1 COMMENT 'Is this field included as a column in the selector table?';
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_individual Table Structure
--- *
--- *******************************************************/
-
-
-ALTER TABLE civicrm_individual ADD prefix_id int unsigned COMMENT 'Prefix or Title for name (Ms, Mr...). FK to prefix ID';
-
-ALTER TABLE civicrm_individual ADD suffix_id int unsigned COMMENT 'Suffix for name (Jr, Sr...). FK to suffix ID';
-
-ALTER TABLE civicrm_individual ADD gender_id int unsigned COMMENT 'FK to gender ID';
-
-
-ALTER TABLE civicrm_individual ADD INDEX (prefix_id);
-ALTER TABLE civicrm_individual ADD FOREIGN KEY (prefix_id) REFERENCES civicrm_individual_prefix(id);
-
-ALTER TABLE civicrm_individual ADD INDEX (suffix_id);
-ALTER TABLE civicrm_individual ADD FOREIGN KEY (suffix_id) REFERENCES civicrm_individual_suffix(id);
-
-ALTER TABLE civicrm_individual ADD INDEX (gender_id);
-ALTER TABLE civicrm_individual ADD FOREIGN KEY (gender_id) REFERENCES civicrm_gender(id);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_custom_field ADD options_per_line int unsigned DEFAULT 0 COMMENT 'number of options per line for checkbox and radio';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_group Table Structure
--- *
--- *******************************************************/
-
-
-ALTER TABLE civicrm_group ADD visibility enum('User and User Admin Only', 'Public User Pages', 'Public User Pages and Listings') DEFAULT 'User and User Admin Only' COMMENT 'In what context(s) is this field visible.';
-
--- /*******************************************************
--- *
--- * Insert data in to civicrm_individual_prefix civicrm_individual_suffix and civicrm_gender
--- *
--- *******************************************************/
-
-
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Mrs', 1, 1);
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Ms', 2, 1);
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Mr', 3, 1);
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Dr', 4, 1);
-
-INSERT INTO civicrm_individual_suffix (domain_id, name, weight, is_active) VALUES ( 1, 'Jr', 1, 1);
-INSERT INTO civicrm_individual_suffix (domain_id, name, weight, is_active) VALUES ( 1, 'Sr', 2, 1);
-INSERT INTO civicrm_individual_suffix (domain_id, name, weight, is_active) VALUES ( 1, 'II', 3, 1);
-
-INSERT INTO civicrm_gender (domain_id, name, weight, is_active) VALUES ( 1, 'Female', 1, 1);
-INSERT INTO civicrm_gender (domain_id, name, weight, is_active) VALUES ( 1, 'Male', 2, 1);
-INSERT INTO civicrm_gender (domain_id, name, weight, is_active) VALUES ( 1, 'Transgender', 3, 1);
-
-
--- /*******************************************************
--- *
--- * adding data for perefix, suffix and gender in the individual table
--- *
--- *******************************************************/
-
-UPDATE civicrm_individual SET prefix_id=1 WHERE prefix='Mrs';
-UPDATE civicrm_individual SET prefix_id=2 WHERE prefix='Ms';
-UPDATE civicrm_individual SET prefix_id=3 WHERE prefix='Mr';
-UPDATE civicrm_individual SET prefix_id=4 WHERE prefix='Dr';
-
-UPDATE civicrm_individual SET suffix_id=1 WHERE suffix='Jr';
-UPDATE civicrm_individual SET suffix_id=2 WHERE suffix='Sr';
-UPDATE civicrm_individual SET suffix_id=3 WHERE suffix='II';
-
-UPDATE civicrm_individual SET gender_id=1 WHERE gender='Female';
-UPDATE civicrm_individual SET gender_id=2 WHERE gender='Male';
-UPDATE civicrm_individual SET gender_id=3 WHERE gender='Transgender';
-
--- Also reset all the is_reserved fields for the generic types
-UPDATE civicrm_relationship_type SET is_reserved=0;
-UPDATE civicrm_location_type SET is_reserved=0;
-UPDATE civicrm_im_provider SET is_reserved=0;
-UPDATE civicrm_mobile_provider SET is_reserved=0;
-
--- /*******************************************************
--- *
--- * also update custom_field and group with the default values
--- *
--- *******************************************************/
-
-
-UPDATE civicrm_custom_field SET options_per_line = 0;
-UPDATE civicrm_custom_field SET options_per_line = 1 WHERE html_type = 'Radio' OR html_type = 'CheckBox';
-
-UPDATE civicrm_group SET visibility = 'User and User Admin Only' WHERE 1;
-
--- /*******************************************************
--- *
--- * Drop old columns
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_uf_field DROP listings_title;
-
-
-ALTER TABLE civicrm_individual DROP prefix;
-
-ALTER TABLE civicrm_individual DROP suffix;
-
-ALTER TABLE civicrm_individual DROP gender;
-
-
-
--- /*******************************************************
--- *
--- * Drop Old Tables
--- *
--- *******************************************************/
-
-DROP TABLE IF EXISTS civicrm_import_mapping_field;
-
-DROP TABLE IF EXISTS civicrm_import_mapping;
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * Clean up the exisiting tables
--- *
--- *******************************************************/
-DROP TABLE IF EXISTS civicrm_mapping_field;
-DROP TABLE IF EXISTS civicrm_mapping;
-DROP TABLE IF EXISTS civicrm_individual_suffix;
-DROP TABLE IF EXISTS civicrm_individual_prefix;
-DROP TABLE IF EXISTS civicrm_gender;
-
--- /*******************************************************
--- *
--- * Ensure we're working with InnoDBs for foreign keys' sake
--- *
--- *******************************************************/
-ALTER TABLE civicrm_domain ENGINE=InnoDB;
-ALTER TABLE civicrm_location_type ENGINE=InnoDB;
-ALTER TABLE civicrm_relationship_type ENGINE=InnoDB;
-
--- /*******************************************************
--- *
--- * civicrm_mapping
--- *
--- * Store field mappings in import or export for reuse
--- *
--- *******************************************************/
-CREATE TABLE civicrm_mapping (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Mapping ID',
- domain_id int unsigned NOT NULL COMMENT 'Domain to which this mapping belongs',
- name varchar(64) COMMENT 'Name of Mapping',
- description varchar(255) COMMENT 'Description of Mapping.',
- mapping_type enum('Export', 'Import') COMMENT 'Type of Mapping.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name(
- name
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_individual_prefix
--- *
--- *******************************************************/
-CREATE TABLE civicrm_individual_prefix (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Individual Prefix ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this individual prefix.',
- name varchar(64) COMMENT 'Individual Prefix Name.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls Individual Prefix order in the select box.',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_individual_suffix
--- *
--- *******************************************************/
-CREATE TABLE civicrm_individual_suffix (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Individual Suffix ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this individual suffix.',
- name varchar(64) COMMENT 'Individual Suffix Name.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls Individual Suffix order in the select box.',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_mapping_field
--- *
--- * Individual field mappings for Mapping
--- *
--- *******************************************************/
-CREATE TABLE civicrm_mapping_field (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Mapping Field ID',
- mapping_id int unsigned NOT NULL COMMENT 'Mapping to which this field belongs',
- name varchar(64) COMMENT 'Mapping field key',
- contact_type varchar(64) COMMENT 'Contact Type in mapping',
- column_number int unsigned NOT NULL COMMENT 'Column number for mapping set',
- location_type_id int unsigned COMMENT 'Location type of this mapping, if required',
- phone_type varchar(64) COMMENT 'Phone type, if required',
- relationship_type_id int unsigned COMMENT 'Relationship type, if required'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (mapping_id) REFERENCES civicrm_mapping(id)
-,
- FOREIGN KEY (location_type_id) REFERENCES civicrm_location_type(id)
-,
- FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_gender
--- *
--- *******************************************************/
-CREATE TABLE civicrm_gender (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Gender ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this gender.',
- name varchar(64) COMMENT 'Gender Name.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls Gender order in the select box.',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_uf_group ADD help_pre text COMMENT 'Description and/or help text to display before fields in form.';
-
-ALTER TABLE civicrm_uf_group ADD help_post text COMMENT 'Description and/or help text to display after fields in form.';
-
-ALTER TABLE civicrm_uf_group ADD weight int NOT NULL DEFAULT 1 COMMENT 'Controls display order when multiple user framework groups are setup for concurrent display.';
-
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_field Table Structure
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_uf_field ADD in_selector tinyint DEFAULT 1 COMMENT 'Is this field included as a column in the selector table?';
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_individual Table Structure
--- *
--- *******************************************************/
-
-
-ALTER TABLE civicrm_individual ADD prefix_id int unsigned COMMENT 'Prefix or Title for name (Ms, Mr...). FK to prefix ID';
-
-ALTER TABLE civicrm_individual ADD suffix_id int unsigned COMMENT 'Suffix for name (Jr, Sr...). FK to suffix ID';
-
-ALTER TABLE civicrm_individual ADD gender_id int unsigned COMMENT 'FK to gender ID';
-
-
-ALTER TABLE civicrm_individual ADD FOREIGN KEY (prefix_id) REFERENCES civicrm_individual_prefix(id);
-
-ALTER TABLE civicrm_individual ADD FOREIGN KEY (suffix_id) REFERENCES civicrm_individual_suffix(id);
-
-ALTER TABLE civicrm_individual ADD FOREIGN KEY (gender_id) REFERENCES civicrm_gender(id);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_custom_field ADD options_per_line int unsigned DEFAULT 0 COMMENT 'number of options per line for checkbox and radio';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_group Table Structure
--- *
--- *******************************************************/
-
-
-ALTER TABLE civicrm_group ADD visibility enum('User and User Admin Only', 'Public User Pages', 'Public User Pages and Listings') DEFAULT 'User and User Admin Only' COMMENT 'In what context(s) is this field visible.';
-
--- /*******************************************************
--- *
--- * Insert data in to civicrm_individual_prefix civicrm_individual_suffix and civicrm_gender
--- *
--- *******************************************************/
-
-
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Mrs', 1, 1);
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Ms', 2, 1);
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Mr', 3, 1);
-INSERT INTO civicrm_individual_prefix (domain_id, name, weight, is_active) VALUES ( 1, 'Dr', 4, 1);
-
-INSERT INTO civicrm_individual_suffix (domain_id, name, weight, is_active) VALUES ( 1, 'Jr', 1, 1);
-INSERT INTO civicrm_individual_suffix (domain_id, name, weight, is_active) VALUES ( 1, 'Sr', 2, 1);
-INSERT INTO civicrm_individual_suffix (domain_id, name, weight, is_active) VALUES ( 1, 'II', 3, 1);
-
-INSERT INTO civicrm_gender (domain_id, name, weight, is_active) VALUES ( 1, 'Female', 1, 1);
-INSERT INTO civicrm_gender (domain_id, name, weight, is_active) VALUES ( 1, 'Male', 2, 1);
-INSERT INTO civicrm_gender (domain_id, name, weight, is_active) VALUES ( 1, 'Transgender', 3, 1);
-
-
--- /*******************************************************
--- *
--- * adding data for perefix, suffix and gender in the individual table
--- *
--- *******************************************************/
-
-UPDATE civicrm_individual SET prefix_id=1 WHERE prefix='Mrs';
-UPDATE civicrm_individual SET prefix_id=2 WHERE prefix='Ms';
-UPDATE civicrm_individual SET prefix_id=3 WHERE prefix='Mr';
-UPDATE civicrm_individual SET prefix_id=4 WHERE prefix='Dr';
-
-UPDATE civicrm_individual SET suffix_id=1 WHERE suffix='Jr';
-UPDATE civicrm_individual SET suffix_id=2 WHERE suffix='Sr';
-UPDATE civicrm_individual SET suffix_id=3 WHERE suffix='II';
-
-UPDATE civicrm_individual SET gender_id=1 WHERE gender='Female';
-UPDATE civicrm_individual SET gender_id=2 WHERE gender='Male';
-UPDATE civicrm_individual SET gender_id=3 WHERE gender='Transgender';
-
--- Also reset all the is_reserved fields for the generic types
-UPDATE civicrm_relationship_type SET is_reserved=0;
-UPDATE civicrm_location_type SET is_reserved=0;
-UPDATE civicrm_im_provider SET is_reserved=0;
-UPDATE civicrm_mobile_provider SET is_reserved=0;
-
--- /*******************************************************
--- *
--- * also update custom_field and group with the default values
--- *
--- *******************************************************/
-
-UPDATE civicrm_custom_field SET options_per_line = 0;
-UPDATE civicrm_custom_field SET options_per_line = 1 WHERE html_type = 'Radio' OR html_type = 'CheckBox';
-
-UPDATE civicrm_group SET visibility = 'User and User Admin Only' WHERE 1;
-
--- /*******************************************************
--- *
--- * Drop old columns
--- *
--- *******************************************************/
-
-ALTER TABLE civicrm_uf_field DROP listings_title;
-
-
-ALTER TABLE civicrm_individual DROP prefix;
-
-ALTER TABLE civicrm_individual DROP suffix;
-
-ALTER TABLE civicrm_individual DROP gender;
-
-
-
--- /*******************************************************
--- *
--- * Drop Old Tables
--- *
--- *******************************************************/
-
-DROP TABLE IF EXISTS civicrm_import_mapping_field;
-
-DROP TABLE IF EXISTS civicrm_import_mapping;
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * adding of new tables
--- *
--- *******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_accept_credit_card
--- *
--- *******************************************************/
-CREATE TABLE civicrm_accept_credit_card (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT ' Accept Credit Card ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this credit card.',
- name varchar(64) COMMENT ' Credit Card Type as defined by the payment processor.',
- title varchar(64) COMMENT 'Descriptive Credit Card Name.',
- is_reserved tinyint COMMENT 'Is this a predefined system object?',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_contribtion_type
--- *
--- *******************************************************/
-
-CREATE TABLE civicrm_contribution_type (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution Type ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contribution type.',
- name varchar(64) COMMENT 'Contribution Type Name.',
- accounting_code varchar(64) COMMENT 'Optional value for mapping contributions to accounting system codes for each type/category of contribution.',
- description varchar(255) COMMENT 'Contribution Type Description.',
- is_deductible tinyint DEFAULT 1 COMMENT 'Is this contribution type tax-deductible? If true, contributions of this type may be fully OR partially deductible - non-deductible amount is stored in the Contribution record.',
- is_reserved tinyint COMMENT 'Is this a predefined system object?',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_payment_instrument
--- *
--- *
--- *
--- *******************************************************/
-
-CREATE TABLE civicrm_payment_instrument (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT ' Payment Instrument ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this payment instrument.',
- name varchar(64) COMMENT ' Payment Instrument Name.',
- description varchar(255) COMMENT ' Payment Instrument Description.',
- is_reserved tinyint COMMENT 'Is this a predefined system object?',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution
--- *
--- *
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_contribution (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contribution class.',
- contact_id int unsigned NOT NULL COMMENT 'FK to Contact ID',
- contribution_type_id int unsigned COMMENT 'FK to Contribution Type',
- payment_instrument_id int unsigned COMMENT 'FK to Payment Instrument',
- receive_date datetime NOT NULL COMMENT 'when was gift received',
- non_deductible_amount decimal(20,2) DEFAULT 0 COMMENT 'Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible contribution types.',
- total_amount decimal(20,2) NOT NULL COMMENT 'Total amount of this contribution. Use market value for non-monetary gifts.',
- fee_amount decimal(20,2) COMMENT 'actual processor fee if known - may be 0.',
- net_amount decimal(20,2) COMMENT 'actual funds transfer amount; total less fees; if processor does not report actual fee during transaction, this is set to total_amount.',
- trxn_id varchar(255) COMMENT 'unique transaction id; may be processor id, bank id + trans id, or account number + check number... depending on payment_method',
- invoice_id varchar(255) COMMENT 'unique invoice id, system generated or passed in',
- currency varchar(64) NOT NULL COMMENT '3 character string, value derived from payment processor config setting.',
- cancel_date datetime COMMENT 'when was gift cancelled',
- cancel_reason text ,
- receipt_date datetime COMMENT 'when (if) receipt was sent; populated automatically for online donations w/ automatic receipting',
- thankyou_date datetime COMMENT 'when (if) was donor thanked',
- source varchar(255) COMMENT 'Origin of this Contribution.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_contrib_trxn_id_domain_id(
- trxn_id
- , domain_id
- )
- , UNIQUE INDEX UI_contrib_invoice_id_domain_id(
- invoice_id
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-, INDEX FKEY_contact_id ( contact_id ) ,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-, INDEX FKEY_contribution_type_id ( contribution_type_id ) ,
- FOREIGN KEY (contribution_type_id) REFERENCES civicrm_contribution_type(id)
-, INDEX FKEY_payment_instrument_id ( payment_instrument_id ) ,
- FOREIGN KEY (payment_instrument_id) REFERENCES civicrm_payment_instrument(id)
-
-) TYPE=InnoDB ;
-
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_contribution_page (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution Id',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this page',
- title varchar(255) COMMENT 'Contribution Page title. For top of page display',
- intro_text text COMMENT 'Text and html allowed. Displayed below title.',
- contribution_type_id int unsigned NOT NULL COMMENT 'default Contribution type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution',
- is_credit_card_only tinyint DEFAULT 0 COMMENT 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card',
- is_allow_other_amount tinyint DEFAULT 0 COMMENT 'if true, page will include an input text field where user can enter their own amount',
- default_amount decimal(20,2) COMMENT 'the default amount allowed.',
- min_amount decimal(20,2) COMMENT 'if other amounts allowed, user can configure minimum allowed.',
- max_amount decimal(20,2) COMMENT 'if other amounts allowed, user can configure maximum allowed.',
- thankyou_title varchar(255) COMMENT 'Title for Thank-you page (header title tag, and display at the top of the page).',
- thankyou_text text COMMENT 'text and html allowed; displayed above result on success page',
- thankyou_footer text COMMENT 'Text and html allowed; displayed at the bottom of the success page. Common usage is to include link(s) to other pages such as tell-a-friend, etc.',
- is_email_receipt tinyint DEFAULT 1 COMMENT 'if true, receipt is automatically emailed to contact on success',
- receipt_from_name varchar(255) COMMENT 'FROM email name used for receipts generated by contributions to this contribution page.',
- receipt_from_email varchar(255) COMMENT 'FROM email address used for receipts generated by contributions to this contribution page.',
- cc_receipt varchar(255) COMMENT 'comma-separated list of email addresses to cc each time a receipt is sent',
- bcc_receipt varchar(255) COMMENT 'comma-separated list of email addresses to bcc each time a receipt is sent',
- receipt_text text COMMENT 'text to include above standard receipt info on receipt email; emails are text-only, so do not allow html for now',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-, INDEX FKEY_contribution_type_id ( contribution_type_id ) ,
- FOREIGN KEY (contribution_type_id) REFERENCES civicrm_contribution_type(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_dupe_match
--- *
--- *
--- *
--- *******************************************************/
-
-CREATE TABLE civicrm_dupe_match (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique DupeMatch ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- entity_table varchar(64) NOT NULL COMMENT 'Name Of Entity Table',
- rule varchar(255) NOT NULL COMMENT 'String that can Contains valid civicrm core or custom field name,parenthesis,,AND,OR '
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_financial_trxn
--- *
--- *
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_financial_trxn (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Gift ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this gift class.',
- entity_table varchar(64) COMMENT 'physical tablename for entity being extended by this data, e.g. civicrm_contact',
- entity_id int unsigned NOT NULL COMMENT 'FK to record in the entity table specified by entity_table column.',
- trxn_date datetime NOT NULL ,
- trxn_type enum('Debit', 'Credit') NOT NULL ,
- total_amount decimal(20,2) NOT NULL COMMENT 'amount of transaction',
- fee_amount decimal(20,2) COMMENT 'actual processor fee if known - may be 0.',
- net_amount decimal(20,2) COMMENT 'actual funds transfer amount; total less fees; if processor does not report actual fee during transaction, this is set to total_amount.',
- currency varchar(64) NOT NULL COMMENT '3 character string, value derived from payment processor config setting.',
- payment_processor varchar(64) NOT NULL COMMENT 'derived from Processor setting in civicrm.settings.php.',
- trxn_id varchar(255) NOT NULL COMMENT 'unique processor transaction id, bank id + trans id,... depending on payment_method',
- trxn_result_code varchar(255) COMMENT 'processor result code'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
- , UNIQUE INDEX UI_ft_trxn_id_domain_id(
- trxn_id
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
-
--- /*******************************************************
--- *
--- * civicrm_module_profile
--- *
--- *
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_module_profile (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this module profile entry.',
- module varchar(255) COMMENT 'Module Name.',
- entity_table varchar(64) COMMENT 'physical tablename for entity being extended by this data, e.g. civicrm_contact',
- entity_id int unsigned NOT NULL COMMENT 'FK to record in the entity table specified by entity_table column.',
- uf_group_id int unsigned NOT NULL COMMENT 'Which form does this field belong to.',
- weight int NOT NULL DEFAULT 1 COMMENT 'each internal or external module uses this to order multiple profiles associated with an entity_id'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-, INDEX FKEY_uf_group_id ( uf_group_id ) ,
- FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_uf_join
--- *
--- *
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_uf_join (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique table ID',
- is_active tinyint DEFAULT 1 COMMENT 'Is this join currently active?',
- module varchar(64) NOT NULL COMMENT 'Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.',
- entity_table varchar(64) COMMENT 'Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.',
- entity_id int unsigned COMMENT 'Foreign key to the referenced item.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls display order when multiple user framework groups are setup for concurrent display.',
- uf_group_id int unsigned NOT NULL COMMENT 'Which form does this field belong to.'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
-
-, INDEX FKEY_uf_group_id ( uf_group_id ) ,
- FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * Insert Default Data in newly created tables
--- *
--- *******************************************************/
-
- INSERT INTO `civicrm_contribution_type` VALUES (1, 1, 'Donation', NULL, NULL, 1, 0, 1);
- INSERT INTO `civicrm_contribution_type` VALUES (2, 1, 'Member Dues', NULL, NULL, 1, 0, 1);
- INSERT INTO `civicrm_contribution_type` VALUES (3, 1, 'Campaign Contribution', NULL, NULL, 0, 0, 1);
-
- INSERT INTO `civicrm_payment_instrument` VALUES (1, 1, 'Credit Card', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (2, 1, 'Debit Card', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (3, 1, 'Cash', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (4, 1, 'Check', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (5, 1, 'EFT', NULL, 1, 1);
-
- INSERT INTO `civicrm_dupe_match` VALUES (1, 1, 'contact_individual', 'first_name AND last_name AND email');
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` DROP `weight` ;
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_field` DROP `is_registration` ,
- DROP `is_match` ;
-
- ALTER TABLE `civicrm_uf_field` ADD `location_type_id` INT UNSIGNED COMMENT 'Location type of this mapping, if required';
- ALTER TABLE `civicrm_uf_field` ADD INDEX (`location_type_id`);
- ALTER TABLE `civicrm_uf_field` ADD FOREIGN KEY (`location_type_id`) REFERENCES `civicrm_location_type` (`id`);
-
- ALTER TABLE `civicrm_uf_field` ADD `phone_type` VARCHAR( 64 ) COMMENT 'Phone type, if required';
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_option Table Structure
--- *
--- *******************************************************/
-
-
- ALTER TABLE `civicrm_custom_option` ADD `entity_table` VARCHAR( 64 ) COMMENT 'Name of table where item being referenced is stored.' ;
- UPDATE `civicrm_custom_option` SET `entity_table` = 'civicrm_custom_field' ;
-
- ALTER TABLE `civicrm_custom_option` ADD `entity_id` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL;
- UPDATE `civicrm_custom_option` SET entity_id = custom_field_id;
-
- ALTER TABLE `civicrm_custom_option` DROP KEY `UI_label_custom_field_id`;
- ALTER TABLE `civicrm_custom_option` DROP FOREIGN KEY `civicrm_custom_option_ibfk_1`;
- ALTER TABLE `civicrm_custom_option` DROP `custom_field_id`;
-
- ALTER TABLE `civicrm_custom_option` ADD INDEX `index_entity` ( `entity_table`, `entity_id` ) ;
-
-
--- /*******************************************************
--- *
--- * Insert Default data in to civicrm_accept_credit_card
--- *
--- *******************************************************/
-
- INSERT INTO `civicrm_accept_credit_card` VALUES (1,1,'Visa','Visa',0,1),
- (2,1,'MasterCard','Master Card',0,1),
- (3,1,'Amex','American Express',0,1),
- (4,1,'Discover','Discover',0,1);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` CHANGE `extends` `extends` ENUM( 'Contact', 'Individual', 'Household', 'Organization', 'Location', 'Address', 'Contribution', 'Activity', 'Phonecall', 'Meeting', 'Group' ) DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_field` CHANGE `html_type` `html_type` ENUM( 'Text', 'TextArea', 'Select', 'Multi-Select', 'Radio', 'CheckBox', 'Select Date', 'Select State/Province', 'Select Country' ) DEFAULT NULL COMMENT 'HTML types plus several built-in extended types.';
-
-
--- /*******************************************************
--- *
--- * Drop Old Tables
--- *
--- *******************************************************/
-
- DROP TABLE IF EXISTS civicrm_donation_page;
-
-
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
-
--- /*******************************************************
--- *
--- * adding of new tables
--- *
--- *******************************************************/
-
-
--- /*******************************************************
--- *
--- * civicrm_accept_credit_card
--- *
--- *******************************************************/
-CREATE TABLE civicrm_accept_credit_card (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT ' Accept Credit Card ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this credit card.',
- name varchar(64) COMMENT ' Credit Card Type as defined by the payment processor.',
- title varchar(64) COMMENT 'Descriptive Credit Card Name.',
- is_reserved tinyint COMMENT 'Is this a predefined system object?',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
-
-
--- /*******************************************************
--- *
--- * civicrm_contribtion_type
--- *
--- *******************************************************/
-
-CREATE TABLE civicrm_contribution_type (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution Type ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contribution type.',
- name varchar(64) COMMENT 'Contribution Type Name.',
- accounting_code varchar(64) COMMENT 'Optional value for mapping contributions to accounting system codes for each type/category of contribution.',
- description varchar(255) COMMENT 'Contribution Type Description.',
- is_deductible tinyint DEFAULT 1 COMMENT 'Is this contribution type tax-deductible? If true, contributions of this type may be fully OR partially deductible - non-deductible amount is stored in the Contribution record.',
- is_reserved tinyint COMMENT 'Is this a predefined system object?',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_payment_instrument
--- *
--- *
--- *
--- *******************************************************/
-
-CREATE TABLE civicrm_payment_instrument (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT ' Payment Instrument ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this payment instrument.',
- name varchar(64) COMMENT ' Payment Instrument Name.',
- description varchar(255) COMMENT ' Payment Instrument Description.',
- is_reserved tinyint COMMENT 'Is this a predefined system object?',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_name_domain_id(
- name
- , domain_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution
--- *
--- *
--- *
--- *******************************************************/
-
-CREATE TABLE civicrm_contribution (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contribution class.',
- contact_id int unsigned NOT NULL COMMENT 'FK to Contact ID',
- contribution_type_id int unsigned COMMENT 'FK to Contribution Type',
- payment_instrument_id int unsigned COMMENT 'FK to Payment Instrument',
- receive_date datetime NOT NULL COMMENT 'when was gift received',
- non_deductible_amount decimal(20,2) DEFAULT 0 COMMENT 'Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible contribution types.',
- total_amount decimal(20,2) NOT NULL COMMENT 'Total amount of this contribution. Use market value for non-monetary gifts.',
- fee_amount decimal(20,2) COMMENT 'actual processor fee if known - may be 0.',
- net_amount decimal(20,2) COMMENT 'actual funds transfer amount; total less fees; if processor does not report actual fee during transaction, this is set to total_amount.',
- trxn_id varchar(255) COMMENT 'unique transaction id; may be processor id, bank id + trans id, or account number + check number... depending on payment_method',
- invoice_id varchar(255) COMMENT 'unique invoice id, system generated or passed in',
- currency varchar(64) NOT NULL COMMENT '3 character string, value derived from payment processor config setting.',
- cancel_date datetime COMMENT 'when was gift cancelled',
- cancel_reason text ,
- receipt_date datetime COMMENT 'when (if) receipt was sent; populated automatically for online donations w/ automatic receipting',
- thankyou_date datetime COMMENT 'when (if) was donor thanked',
- source varchar(255) COMMENT 'Origin of this Contribution.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_contrib_trxn_id_domain_id(
- trxn_id
- , domain_id
- )
- , UNIQUE INDEX UI_contrib_invoice_id_domain_id(
- invoice_id
- , domain_id
- )
-
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-,
- FOREIGN KEY (contribution_type_id) REFERENCES civicrm_contribution_type(id)
-,
- FOREIGN KEY (payment_instrument_id) REFERENCES civicrm_payment_instrument(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- *******************************************************/
- CREATE TABLE civicrm_contribution_page (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution Id',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this page',
- title varchar(255) COMMENT 'Contribution Page title. For top of page display',
- intro_text text COMMENT 'Text and html allowed. Displayed below title.',
- contribution_type_id int unsigned NOT NULL COMMENT 'default Contribution type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution',
- is_credit_card_only tinyint DEFAULT 0 COMMENT 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card',
- is_allow_other_amount tinyint DEFAULT 0 COMMENT 'if true, page will include an input text field where user can enter their own amount',
- default_amount decimal(20,2) COMMENT 'the default amount allowed.',
- min_amount decimal(20,2) COMMENT 'if other amounts allowed, user can configure minimum allowed.',
- max_amount decimal(20,2) COMMENT 'if other amounts allowed, user can configure maximum allowed.',
- thankyou_title varchar(255) COMMENT 'Title for Thank-you page (header title tag, and display at the top of the page).',
- thankyou_text text COMMENT 'text and html allowed; displayed above result on success page',
- thankyou_footer text COMMENT 'Text and html allowed; displayed at the bottom of the success page. Common usage is to include link(s) to other pages such as tell-a-friend, etc.',
- is_email_receipt tinyint DEFAULT 1 COMMENT 'if true, receipt is automatically emailed to contact on success',
- receipt_from_name varchar(255) COMMENT 'FROM email name used for receipts generated by contributions to this contribution page.',
- receipt_from_email varchar(255) COMMENT 'FROM email address used for receipts generated by contributions to this contribution page.',
- cc_receipt varchar(255) COMMENT 'comma-separated list of email addresses to cc each time a receipt is sent',
- bcc_receipt varchar(255) COMMENT 'comma-separated list of email addresses to bcc each time a receipt is sent',
- receipt_text text COMMENT 'text to include above standard receipt info on receipt email; emails are text-only, so do not allow html for now',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-,
- FOREIGN KEY (contribution_type_id) REFERENCES civicrm_contribution_type(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
-
-
-
--- /*******************************************************
--- *
--- * civicrm_dupe_match
--- *
--- *
--- *
--- *******************************************************/
- CREATE TABLE civicrm_dupe_match (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique DupeMatch ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- entity_table varchar(64) NOT NULL COMMENT 'Name Of Entity Table',
- rule varchar(255) NOT NULL COMMENT 'String that can Contains valid civicrm core or custom field name,parenthesis,,AND,OR '
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
-
--- /*******************************************************
--- *
--- * civicrm_financial_trxn
--- *
--- *
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_financial_trxn (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Gift ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this gift class.',
- entity_table varchar(64) COMMENT 'physical tablename for entity being extended by this data, e.g. civicrm_contact',
- entity_id int unsigned NOT NULL COMMENT 'FK to record in the entity table specified by entity_table column.',
- trxn_date datetime NOT NULL ,
- trxn_type enum('Debit', 'Credit') NOT NULL ,
- total_amount decimal(20,2) NOT NULL COMMENT 'amount of transaction',
- fee_amount decimal(20,2) COMMENT 'actual processor fee if known - may be 0.',
- net_amount decimal(20,2) COMMENT 'actual funds transfer amount; total less fees; if processor does not report actual fee during transaction, this is set to total_amount.',
- currency varchar(64) NOT NULL COMMENT '3 character string, value derived from payment processor config setting.',
- payment_processor varchar(64) NOT NULL COMMENT 'derived from Processor setting in civicrm.settings.php.',
- trxn_id varchar(255) NOT NULL COMMENT 'unique processor transaction id, bank id + trans id,... depending on payment_method',
- trxn_result_code varchar(255) COMMENT 'processor result code'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
- , UNIQUE INDEX UI_ft_trxn_id_domain_id(
- trxn_id
- , domain_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_module_profile
--- *
--- *
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_module_profile (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this module profile entry.',
- module varchar(255) COMMENT 'Module Name.',
- entity_table varchar(64) COMMENT 'physical tablename for entity being extended by this data, e.g. civicrm_contact',
- entity_id int unsigned NOT NULL COMMENT 'FK to record in the entity table specified by entity_table column.',
- uf_group_id int unsigned NOT NULL COMMENT 'Which form does this field belong to.',
- weight int NOT NULL DEFAULT 1 COMMENT 'each internal or external module uses this to order multiple profiles associated with an entity_id'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-,
- FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_uf_join
--- *
--- *
--- *
--- *******************************************************/
-
- CREATE TABLE civicrm_uf_join (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique table ID',
- is_active tinyint DEFAULT 1 COMMENT 'Is this join currently active?',
- module varchar(64) NOT NULL COMMENT 'Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.',
- entity_table varchar(64) COMMENT 'Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.',
- entity_id int unsigned COMMENT 'Foreign key to the referenced item.',
- weight int NOT NULL DEFAULT 1 COMMENT 'Controls display order when multiple user framework groups are setup for concurrent display.',
- uf_group_id int unsigned NOT NULL COMMENT 'Which form does this field belong to.'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
-
-,
- FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
-
-
--- /*******************************************************
--- *
--- * Insert Default Data in newly created tables
--- *
--- *******************************************************/
-
- INSERT INTO `civicrm_contribution_type` VALUES (1, 1, 'Donation', NULL, NULL, 1, 0, 1);
- INSERT INTO `civicrm_contribution_type` VALUES (2, 1, 'Member Dues', NULL, NULL, 1, 0, 1);
- INSERT INTO `civicrm_contribution_type` VALUES (3, 1, 'Campaign Contribution', NULL, NULL, 0, 0, 1);
-
- INSERT INTO `civicrm_payment_instrument` VALUES (1, 1, 'Credit Card', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (2, 1, 'Debit Card', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (3, 1, 'Cash', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (4, 1, 'Check', NULL, 1, 1);
- INSERT INTO `civicrm_payment_instrument` VALUES (5, 1, 'EFT', NULL, 1, 1);
-
- INSERT INTO `civicrm_dupe_match` VALUES (1, 1, 'contact_individual', 'first_name AND last_name AND email');
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` DROP `weight` ;
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_field` DROP `is_registration` ,
- DROP `is_match` ;
-
- ALTER TABLE `civicrm_uf_field` ADD `location_type_id` INT UNSIGNED COMMENT 'Location type of this mapping, if required';
- ALTER TABLE `civicrm_uf_field` ADD FOREIGN KEY (`location_type_id`) REFERENCES `civicrm_location_type` (`id`);
-
- ALTER TABLE `civicrm_uf_field` ADD `phone_type` VARCHAR( 64 ) COMMENT 'Phone type, if required';
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_option Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_option` ADD `entity_table` VARCHAR( 64 ) COMMENT 'Name of table where item being referenced is stored.' ;
- UPDATE `civicrm_custom_option` SET `entity_table` = 'civicrm_custom_field' ;
-
- ALTER TABLE `civicrm_custom_option` ADD `entity_id` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL;
- UPDATE `civicrm_custom_option` SET entity_id = custom_field_id;
-
- ALTER TABLE `civicrm_custom_option` DROP KEY `UI_label_custom_field_id`;
-
- ALTER TABLE `civicrm_custom_option` DROP FOREIGN KEY `civicrm_custom_option_ibfk_1`;
-
- ALTER TABLE `civicrm_custom_option` DROP `custom_field_id`;
-
- ALTER TABLE `civicrm_custom_option` ADD INDEX `index_entity` ( `entity_table`, `entity_id` ) ;
-
-
-
--- /*******************************************************
--- *
--- * Insert Default data in to civicrm_accept_credit_card
--- *
--- *******************************************************/
-
- INSERT INTO `civicrm_accept_credit_card` VALUES (1,1,'Visa','Visa',0,1),
- (2,1,'MasterCard','Master Card',0,1),
- (3,1,'Amex','American Express',0,1),
- (4,1,'Discover','Discover',0,1);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` CHANGE `extends` `extends` ENUM( 'Contact', 'Individual', 'Household', 'Organization', 'Location', 'Address', 'Contribution', 'Activity', 'Phonecall', 'Meeting', 'Group' ) DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_field` CHANGE `html_type` `html_type` ENUM( 'Text', 'TextArea', 'Select', 'Multi-Select', 'Radio', 'CheckBox', 'Select Date', 'Select State/Province', 'Select Country' ) DEFAULT NULL COMMENT 'HTML types plus several built-in extended types.';
-
-
-
--- /*******************************************************
--- *
--- * Drop Old Tables
--- *
--- *******************************************************/
-
- DROP TABLE IF EXISTS civicrm_donation_page;
-
-
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * Clean up the exisiting tables
--- *
--- *******************************************************/
-DROP TABLE IF EXISTS civicrm_contribution_product;
-DROP TABLE IF EXISTS civicrm_sms_history;
-DROP TABLE IF EXISTS civicrm_premiums_product;
-DROP TABLE IF EXISTS civicrm_product;
-DROP TABLE IF EXISTS civicrm_premiums;
-DROP TABLE IF EXISTS civicrm_contribution_recur;
-
-
--- /*******************************************************
--- *
--- * adding of new tables
--- *
--- *******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_contribution_product
--- *
--- *******************************************************/
-CREATE TABLE civicrm_contribution_product (
- id int unsigned NOT NULL AUTO_INCREMENT ,
- product_id int unsigned NOT NULL ,
- contribution_id int unsigned NOT NULL ,
- product_option varchar(255) COMMENT 'Option value selected if applicable - e.g. color, size etc.',
- quantity int ,
- fulfilled_date date COMMENT 'Optional. Can be used to record the date this product was fulfilled or shipped.',
- start_date date COMMENT 'Actual start date for a time-delimited premium (subscription, service or membership)',
- end_date date COMMENT 'Actual end date for a time-delimited premium (subscription, service or membership)',
- comment text
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_contribution_id ( contribution_id ) ,
- FOREIGN KEY (contribution_id) REFERENCES civicrm_contribution(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution_recur
--- *
--- *******************************************************/
-CREATE TABLE civicrm_contribution_recur (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution Recur ID',
- contact_id int unsigned NOT NULL COMMENT 'Foreign key to civicrm_contact.id .',
- amount decimal(20,2) NOT NULL COMMENT 'Amount to be contributed or charged each recurrence.',
- frequency_unit enum('day', 'week', 'month', 'year') DEFAULT 'month' COMMENT 'Time units for recurrence of payment.',
- frequency_interval int unsigned NOT NULL COMMENT 'Number of time units for recurrence of payment.',
- installments int unsigned COMMENT 'Total number of payments to be made. Set this to 0 if this is an open-ended commitment i.e. no set end date.',
- start_date date NOT NULL COMMENT 'The date the first scheduled recurring contribution occurs.',
- create_date date NOT NULL COMMENT 'When this recurring contribution record was created.',
- modified_date date NOT NULL COMMENT 'Last updated date for this record.',
- cancel_date date NOT NULL COMMENT 'Date this recurring contribution was cancelled by contributor- if we can get access to it ??',
- is_active tinyint NOT NULL COMMENT 'Set to false by contributor cancellation or greater than max permitted failures - if we know about that.',
- cycle_day int unsigned NOT NULL DEFAULT 1 COMMENT 'Day in the period when the payment should be charged e.g. 1st of month, 15th etc.',
- next_sched_contribution date NOT NULL COMMENT 'At Groundspring this was used by the cron job which triggered payments. If we\'re not doing that but we know about payments, it might still be useful to store for display to org andor contributors.',
- failure_count int unsigned DEFAULT 0 COMMENT 'Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.',
- failure_retry_date date COMMENT 'At Groundspring we set a business rule to retry failed payments every 7 days - and stored the next scheduled attempt date there.',
- processor_id varchar(255) COMMENT 'Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??',
- auto_renew tinyint NOT NULL DEFAULT 0 COMMENT 'Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.'
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_contact_id ( contact_id ) ,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_premiums
--- *
--- * table - settings for the Premiums features for a given contribution page
--- *
--- *******************************************************/
-CREATE TABLE civicrm_premiums (
- id int unsigned NOT NULL AUTO_INCREMENT ,
- entity_table varchar(64) NOT NULL COMMENT 'Joins these premium settings to another object. Always civicrm_contribution_page for now.',
- entity_id int unsigned NOT NULL ,
- premiums_active tinyint NOT NULL DEFAULT 0 COMMENT 'Is the Premiums feature enabled for this page?',
- premiums_intro_title varchar(255) COMMENT 'Title for Premiums section.',
- premiums_intro_text text COMMENT 'Displayed in <div > at top of Premiums section of page. Text and html allowed.',
- premiums_contact_email varchar(100) COMMENT 'This email address is included in receipts if it is populated and a premium has been selected.',
- premiums_contact_phone varchar(50) COMMENT 'This phone number is included in receipts if it is populated and a premium has been selected.',
- premiums_display_min_contribution tinyint NOT NULL COMMENT 'Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.'
-,
- PRIMARY KEY ( id )
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_product
--- *
--- * able - stores "product info" for premiums and can be used for non-incentive products
--- *
--- *******************************************************/
-CREATE TABLE civicrm_product (
- id int unsigned NOT NULL AUTO_INCREMENT ,
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this product class.',
- name varchar(255) NOT NULL COMMENT 'Required product/premium name',
- description text COMMENT 'Optional description of the product/premium.',
- sku varchar(50) COMMENT 'Optional product sku or code.',
- options text COMMENT 'Store comma-delimited list of color, size, etc. options for the product.',
- image varchar(255) COMMENT 'Full or relative URL to uploaded image - fullsize.',
- thumbnail varchar(255) COMMENT 'Full or relative URL to image thumbnail.',
- price decimal(20,2) COMMENT 'Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.',
- min_contribution decimal(20,2) COMMENT 'Minimum contribution required to be eligible to select this premium.',
- cost decimal(20,2) COMMENT 'Actual cost of this product. Useful to determine net return from sale or using this as an incentive.',
- is_active tinyint NOT NULL COMMENT 'Disabling premium removes it from the premiums_premium join table below.',
- period_type enum('rolling', 'fixed') DEFAULT 'rolling' COMMENT 'Rolling means we set start/end based on current day, fixed means we set start/end for current year or month
-(e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) ',
- fixed_period_start_day int DEFAULT 0101 COMMENT 'Month and day (MMDD) that fixed period type subscription or membership starts.',
- duration_unit enum('day', 'month', 'week', 'year') DEFAULT 'year' ,
- duration_interval int COMMENT 'Number of units for total duration of subscription, service, membership (e.g. 12 Months).',
- frequency_unit enum('day', 'month', 'week', 'year') DEFAULT 'month' COMMENT 'Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.',
- frequency_interval int COMMENT 'Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).'
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_premiums_product
--- *
--- * joins premiums (settings) to individual product/premium items - determines which products are available for a given contribution page
--- *
--- *******************************************************/
-CREATE TABLE civicrm_premiums_product (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution ID',
- premiums_id int unsigned NOT NULL COMMENT 'Foreign key to premiums settings record.',
- product_id int unsigned NOT NULL COMMENT 'Foreign key to each product object.',
- sort_position int unsigned NOT NULL
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_premiums_id ( premiums_id ) ,
- FOREIGN KEY (premiums_id) REFERENCES civicrm_premiums(id)
-, INDEX FKEY_product_id ( product_id ) ,
- FOREIGN KEY (product_id) REFERENCES civicrm_product(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_sms_history
--- *
--- * SMS History can be linked to any object in the application.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_sms_history (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'SMS History ID',
- message text COMMENT 'Contents of the SMS.',
- contact_id int unsigned NOT NULL COMMENT 'FK to Contact who is sending this SMS',
- sent_date date COMMENT 'When was this SMS sent'
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_contact_id ( contact_id ) ,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contact Table Structure
--- * (keep this in for 1.4 to 1.5 as it was added late to 1.4)
--- *******************************************************/
-
- ALTER TABLE `civicrm_contact` MODIFY `preferred_mail_format` enum('Text', 'HTML', 'Both') DEFAULT 'Both';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution` ADD `solicitor_id` int unsigned COMMENT 'FK to Solicitor ID';
-
- ALTER TABLE `civicrm_contribution` ADD INDEX (`solicitor_id`);
-
- ALTER TABLE `civicrm_contribution` ADD FOREIGN KEY (`solicitor_id`) REFERENCES `civicrm_contact` (`id`);
-
- ALTER TABLE `civicrm_contribution` ADD note text COMMENT 'Note and/or Comment.';
-
- ALTER TABLE `civicrm_contribution` ADD recur_contribution_id int unsigned COMMENT 'Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.';
-
- ALTER TABLE `civicrm_contribution` ADD INDEX (`recur_contribution_id`);
-
- ALTER TABLE `civicrm_contribution` ADD CONSTRAINT FOREIGN KEY (recur_contribution_id) REFERENCES civicrm_contribution_recur(id);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution_page Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution_page` ADD footer_text text COMMENT 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_field` ADD is_search_range tinyint DEFAULT 0 COMMENT 'Is this property range searchable.';
- ALTER TABLE `civicrm_custom_field` ADD start_date_years int unsigned COMMENT 'Date may be up to start_date_years years prior to tcurrent date ';
- ALTER TABLE `civicrm_custom_field` ADD end_date_years int unsigned COMMENT 'Date may be up to end_date_years years after to tcurrent date ';
- ALTER TABLE `civicrm_custom_field` ADD date_parts varchar(255) COMMENT 'which date part included in display ';
- ALTER TABLE `civicrm_custom_field` ADD note_columns int unsigned COMMENT ' Number of columns in Note Field ';
- ALTER TABLE `civicrm_custom_field` ADD note_rows int unsigned COMMENT ' Number of rows in Note Field ';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_domain Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_domain` ADD email_return_path varchar(64) COMMENT 'The domain from which outgoing email for this domain will appear to originate';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_location Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_location` ADD name varchar(255);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_field` ADD is_searchable tinyint DEFAULT 0 COMMENT 'Is this field included search form of profile?';
-
- ALTER TABLE `civicrm_uf_field` ADD label varchar(255) COMMENT 'To save label for fields.';
-
- ALTER TABLE `civicrm_uf_field` ADD field_type varchar(255) COMMENT 'This field saves field type (ie individual,household.. field etc).';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD limit_listings_group_id int unsigned COMMENT 'Group id, foreign key from civicrm_group';
-
- ALTER TABLE `civicrm_uf_group` ADD INDEX (`limit_listings_group_id`);
-
- ALTER TABLE `civicrm_uf_group` ADD FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
-
- ALTER TABLE `civicrm_uf_group` ADD post_URL varchar(255) COMMENT 'Redirect to URL.';
-
-
--- /*******************************************************
--- *
--- * update civicrm_uf_field with the default values (also fix label)
--- *
--- *******************************************************/
-
- UPDATE civicrm_uf_field SET is_searchable = 1 WHERE in_selector = 1 AND visibility = 'Public User Pages and Listings';
-
- UPDATE civicrm_uf_field SET label=field_name, field_type='Individual';
-
-
--- /*******************************************************
--- *
--- * Drop Old Tables
--- *
--- *******************************************************/
-
- DROP TABLE IF EXISTS civicrm_module_profile;
-
-
--- /*******************************************************
--- *
--- * update abbreviation for New Hampshire in case it is still wrong
--- *
--- *******************************************************/
-
- UPDATE civicrm_state_province SET abbreviation = 'NH' WHERE id = 1028;
-
-
--- /*******************************************************
--- *
--- * update the name of the Mexican state of Morelos
--- *
--- *******************************************************/
-
- UPDATE civicrm_state_province SET name = 'Morelos' WHERE id = 3819;
-
-
--- /*******************************************************
--- *
--- * update the custom fields set options per line if it is null
--- *
--- *******************************************************/
-
- UPDATE civicrm_custom_field SET options_per_line=0 WHERE options_per_line IS NULL;
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * Clean up the exisiting tables
--- *
--- *******************************************************/
-DROP TABLE IF EXISTS civicrm_contribution_product;
-DROP TABLE IF EXISTS civicrm_sms_history;
-DROP TABLE IF EXISTS civicrm_premiums_product;
-DROP TABLE IF EXISTS civicrm_product;
-DROP TABLE IF EXISTS civicrm_premiums;
-DROP TABLE IF EXISTS civicrm_contribution_recur;
-
-
--- /*******************************************************
--- *
--- * adding of new tables
--- *
--- *******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_contribution_product
--- *
--- *******************************************************/
-CREATE TABLE civicrm_contribution_product (
- id int unsigned NOT NULL AUTO_INCREMENT ,
- product_id int unsigned NOT NULL ,
- contribution_id int unsigned NOT NULL ,
- product_option varchar(255) COMMENT 'Option value selected if applicable - e.g. color, size etc.',
- quantity int ,
- fulfilled_date date COMMENT 'Optional. Can be used to record the date this product was fulfilled or shipped.',
- start_date date COMMENT 'Actual start date for a time-delimited premium (subscription, service or membership)',
- end_date date COMMENT 'Actual end date for a time-delimited premium (subscription, service or membership)',
- comment text
-,
- PRIMARY KEY ( id )
-,
- FOREIGN KEY (contribution_id) REFERENCES civicrm_contribution(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution_recur
--- *
--- *******************************************************/
-CREATE TABLE civicrm_contribution_recur (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution Recur ID',
- contact_id int unsigned NOT NULL COMMENT 'Foreign key to civicrm_contact.id .',
- amount decimal(20,2) NOT NULL COMMENT 'Amount to be contributed or charged each recurrence.',
- frequency_unit enum('day', 'week', 'month', 'year') DEFAULT 'month' COMMENT 'Time units for recurrence of payment.',
- frequency_interval int unsigned NOT NULL COMMENT 'Number of time units for recurrence of payment.',
- installments int unsigned COMMENT 'Total number of payments to be made. Set this to 0 if this is an open-ended commitment i.e. no set end date.',
- start_date date NOT NULL COMMENT 'The date the first scheduled recurring contribution occurs.',
- create_date date NOT NULL COMMENT 'When this recurring contribution record was created.',
- modified_date date NOT NULL COMMENT 'Last updated date for this record.',
- cancel_date date NOT NULL COMMENT 'Date this recurring contribution was cancelled by contributor- if we can get access to it ??',
- is_active tinyint NOT NULL COMMENT 'Set to false by contributor cancellation or greater than max permitted failures - if we know about that.',
- cycle_day int unsigned NOT NULL DEFAULT 1 COMMENT 'Day in the period when the payment should be charged e.g. 1st of month, 15th etc.',
- next_sched_contribution date NOT NULL COMMENT 'At Groundspring this was used by the cron job which triggered payments. If we\'re not doing that but we know about payments, it might still be useful to store for display to org andor contributors.',
- failure_count int unsigned DEFAULT 0 COMMENT 'Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.',
- failure_retry_date date COMMENT 'At Groundspring we set a business rule to retry failed payments every 7 days - and stored the next scheduled attempt date there.',
- processor_id varchar(255) COMMENT 'Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??',
- auto_renew tinyint NOT NULL DEFAULT 0 COMMENT 'Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.'
-,
- PRIMARY KEY ( id )
-,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_premiums
--- *
--- * table - settings for the Premiums features for a given contribution page
--- *
--- *******************************************************/
-CREATE TABLE civicrm_premiums (
- id int unsigned NOT NULL AUTO_INCREMENT ,
- entity_table varchar(64) NOT NULL COMMENT 'Joins these premium settings to another object. Always civicrm_contribution_page for now.',
- entity_id int unsigned NOT NULL ,
- premiums_active tinyint NOT NULL DEFAULT 0 COMMENT 'Is the Premiums feature enabled for this page?',
- premiums_intro_title varchar(255) COMMENT 'Title for Premiums section.',
- premiums_intro_text text COMMENT 'Displayed in <div > at top of Premiums section of page. Text and html allowed.',
- premiums_contact_email varchar(100) COMMENT 'This email address is included in receipts if it is populated and a premium has been selected.',
- premiums_contact_phone varchar(50) COMMENT 'This phone number is included in receipts if it is populated and a premium has been selected.',
- premiums_display_min_contribution tinyint NOT NULL COMMENT 'Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.'
-,
- PRIMARY KEY ( id )
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_product
--- *
--- * able - stores "product info" for premiums and can be used for non-incentive products
--- *
--- *******************************************************/
-CREATE TABLE civicrm_product (
- id int unsigned NOT NULL AUTO_INCREMENT ,
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this product class.',
- name varchar(255) NOT NULL COMMENT 'Required product/premium name',
- description text COMMENT 'Optional description of the product/premium.',
- sku varchar(50) COMMENT 'Optional product sku or code.',
- options text COMMENT 'Store comma-delimited list of color, size, etc. options for the product.',
- image varchar(255) COMMENT 'Full or relative URL to uploaded image - fullsize.',
- thumbnail varchar(255) COMMENT 'Full or relative URL to image thumbnail.',
- price decimal(20,2) COMMENT 'Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.',
- min_contribution decimal(20,2) COMMENT 'Minimum contribution required to be eligible to select this premium.',
- cost decimal(20,2) COMMENT 'Actual cost of this product. Useful to determine net return from sale or using this as an incentive.',
- is_active tinyint NOT NULL COMMENT 'Disabling premium removes it from the premiums_premium join table below.',
- period_type enum('rolling', 'fixed') DEFAULT 'rolling' COMMENT 'Rolling means we set start/end based on current day, fixed means we set start/end for current year or month
-(e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) ',
- fixed_period_start_day int DEFAULT 0101 COMMENT 'Month and day (MMDD) that fixed period type subscription or membership starts.',
- duration_unit enum('day', 'month', 'week', 'year') DEFAULT 'year' ,
- duration_interval int COMMENT 'Number of units for total duration of subscription, service, membership (e.g. 12 Months).',
- frequency_unit enum('day', 'month', 'week', 'year') DEFAULT 'month' COMMENT 'Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.',
- frequency_interval int COMMENT 'Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).'
-,
- PRIMARY KEY ( id )
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_premiums_product
--- *
--- * joins premiums (settings) to individual product/premium items - determines which products are available for a given contribution page
--- *
--- *******************************************************/
-CREATE TABLE civicrm_premiums_product (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution ID',
- premiums_id int unsigned NOT NULL COMMENT 'Foreign key to premiums settings record.',
- product_id int unsigned NOT NULL COMMENT 'Foreign key to each product object.',
- sort_position int unsigned NOT NULL
-,
- PRIMARY KEY ( id )
-,
- FOREIGN KEY (premiums_id) REFERENCES civicrm_premiums(id)
-,
- FOREIGN KEY (product_id) REFERENCES civicrm_product(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_sms_history
--- *
--- * SMS History can be linked to any object in the application.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_sms_history (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'SMS History ID',
- message text COMMENT 'Contents of the SMS.',
- contact_id int unsigned NOT NULL COMMENT 'FK to Contact who is sending this SMS',
- sent_date date COMMENT 'When was this SMS sent'
-,
- PRIMARY KEY ( id )
-,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contact Table Structure
--- * (keep this in for 1.4 to 1.5 as it was added late to 1.4)
--- *******************************************************/
-
- ALTER TABLE `civicrm_contact` MODIFY `preferred_mail_format` enum('Text', 'HTML', 'Both') DEFAULT 'Both';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution` ADD `solicitor_id` int unsigned COMMENT 'FK to Solicitor ID';
-
- ALTER TABLE `civicrm_contribution` ADD CONSTRAINT FOREIGN KEY (`solicitor_id`) REFERENCES `civicrm_contact` (`id`);
-
- ALTER TABLE `civicrm_contribution` ADD note text COMMENT 'Note and/or Comment.';
-
- ALTER TABLE `civicrm_contribution` ADD recur_contribution_id int unsigned COMMENT 'Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.';
-
- ALTER TABLE `civicrm_contribution` ADD CONSTRAINT FOREIGN KEY (recur_contribution_id) REFERENCES civicrm_contribution_recur(id);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution_page Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution_page` ADD footer_text text COMMENT 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_field` ADD is_search_range tinyint DEFAULT 0 COMMENT 'Is this property range searchable.';
- ALTER TABLE `civicrm_custom_field` ADD start_date_years int unsigned COMMENT 'Date may be up to start_date_years years prior to tcurrent date ';
- ALTER TABLE `civicrm_custom_field` ADD end_date_years int unsigned COMMENT 'Date may be up to end_date_years years after to tcurrent date ';
- ALTER TABLE `civicrm_custom_field` ADD date_parts varchar(255) COMMENT 'which date part included in display ';
- ALTER TABLE `civicrm_custom_field` ADD note_columns int unsigned COMMENT ' Number of columns in Note Field ';
- ALTER TABLE `civicrm_custom_field` ADD note_rows int unsigned COMMENT ' Number of rows in Note Field ';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_domain Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_domain` ADD email_return_path varchar(64) COMMENT 'The domain from which outgoing email for this domain will appear to originate';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_location Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_location` ADD name varchar(255);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_field` ADD is_searchable tinyint DEFAULT 0 COMMENT 'Is this field included search form of profile?';
-
- ALTER TABLE `civicrm_uf_field` ADD label varchar(255) COMMENT 'To save label for fields.';
-
- ALTER TABLE `civicrm_uf_field` ADD field_type varchar(255) COMMENT 'This field saves field type (ie individual,household.. field etc).';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD limit_listings_group_id int unsigned COMMENT 'Group id, foreign key from civicrm_group';
-
- ALTER TABLE `civicrm_uf_group` ADD CONSTRAINT FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
-
- ALTER TABLE `civicrm_uf_group` ADD post_URL varchar(255) COMMENT 'Redirect to URL.';
-
-
--- /*******************************************************
--- *
--- * update civicrm_uf_field with the default values (also fix label)
--- *
--- *******************************************************/
-
- UPDATE civicrm_uf_field SET is_searchable = 1 WHERE in_selector = 1 AND visibility = 'Public User Pages and Listings';
-
- UPDATE civicrm_uf_field SET label=field_name, field_type='Individual';
-
-
--- /*******************************************************
--- *
--- * Drop Old Tables
--- *
--- *******************************************************/
-
- DROP TABLE IF EXISTS civicrm_module_profile;
-
-
--- /*******************************************************
--- *
--- * update abbreviation for New Hampshire in case it is still wrong
--- *
--- *******************************************************/
-
- UPDATE civicrm_state_province SET abbreviation = 'NH' WHERE id = 1028;
-
-
-
--- /*******************************************************
--- *
--- * update the name of the Mexican state of Morelos
--- *
--- *******************************************************/
-
- UPDATE civicrm_state_province SET name = 'Morelos' WHERE id = 3819;
-
-
--- /*******************************************************
--- *
--- * update the custom fields set options per line if it is null
--- *
--- *******************************************************/
-
- UPDATE civicrm_custom_field SET options_per_line=0 WHERE options_per_line IS NULL;
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
-
--- /*******************************************************
--- *
--- * civicrm_membership_type
--- *
--- * Sites can configure multiple types of memberships. They encode the owner organization, fee, and the rules needed to set start and end (expire) dates when a member signs up for that type.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_type (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- name varchar(128) COMMENT 'Name of Membership Type',
- description varchar(255) COMMENT 'Description of Membership Type',
- member_of_contact_id int unsigned NOT NULL COMMENT 'Owner organization for this membership type. FK to Contact ID',
- contribution_type_id int unsigned NOT NULL COMMENT 'If membership is paid by a contribution - what contribution type should be used. FK to Contribution Type ID',
- minimum_fee decimal(20,2) DEFAULT 0 COMMENT 'Minimum fee for this membership (0 for free/complimentary memberships).',
- duration_unit enum('day', 'month', 'year', 'lifetime') COMMENT 'Unit in which membership period is expressed.',
- duration_interval int COMMENT 'Number of duration units in membership period (e.g. 1 year, 12 months).',
- period_type enum('rolling', 'fixed') COMMENT 'Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.',
- fixed_period_start_day int DEFAULT 0101 COMMENT 'For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.',
- fixed_period_rollover_day int DEFAULT 1231 COMMENT 'For fixed period memberships, signups after this day (mmdd) rollover to next period.',
- relationship_type_id int unsigned COMMENT 'FK to Relationship Type ID',
- visibility varchar(64) ,
- weight int ,
- is_active tinyint DEFAULT 1 COMMENT 'Is this membership_type enabled'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-, INDEX FKEY_member_of_contact_id ( member_of_contact_id ) ,
- FOREIGN KEY (member_of_contact_id) REFERENCES civicrm_contact(id)
-, INDEX FKEY_contribution_type_id ( contribution_type_id ) ,
- FOREIGN KEY (contribution_type_id) REFERENCES civicrm_contribution_type(id)
-, INDEX FKEY_relationship_type_id ( relationship_type_id ) ,
- FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_membership_status
--- *
--- * Membership Status stores admin configurable rules for assigning status to memberships.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_status (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- name varchar(128) COMMENT 'Name for Membership Status',
- start_event enum('start_date', 'end_date', 'join_date') COMMENT 'Event when this status starts.',
- start_event_adjust_unit enum('day', 'month', 'year') COMMENT 'Unit used for adjusting from start_event.',
- start_event_adjust_interval int COMMENT 'Status range begins this many units from start_event.',
- end_event enum('start_date', 'end_date', 'join_date') COMMENT 'Event after which this status ends.',
- end_event_adjust_unit enum('day', 'month', 'year') COMMENT 'Unit used for adjusting from the ending event.',
- end_event_adjust_interval int COMMENT 'Status range ends this many units from end_event.',
- is_current_member tinyint COMMENT 'Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).',
- is_admin tinyint COMMENT 'Is this status for admin/manual assignment only.',
- weight int ,
- is_default tinyint COMMENT 'Assign this status to a membership record if no other status match is found.',
- is_active tinyint DEFAULT 1 COMMENT 'Is this membership_status enabled.'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_membership
--- *
--- * Contact Membership records.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- contact_id int unsigned NOT NULL COMMENT 'FK to Contact ID',
- membership_type_id int unsigned NOT NULL COMMENT 'FK to Membership Type',
- join_date date COMMENT 'Beginning of initial membership period (member since...).',
- start_date date COMMENT 'Beginning of current uninterrupted membership period.',
- end_date date COMMENT 'Current membership period expire date.',
- source varchar(128) ,
- status_id int unsigned NOT NULL COMMENT 'FK to Membership Status',
- is_override tinyint COMMENT 'Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_contact_id ( contact_id ) ,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-, INDEX FKEY_membership_type_id ( membership_type_id ) ,
- FOREIGN KEY (membership_type_id) REFERENCES civicrm_membership_type(id)
-, INDEX FKEY_status_id ( status_id ) ,
- FOREIGN KEY (status_id) REFERENCES civicrm_membership_status(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_membership_block
--- *
--- * A Membership Block stores admin configurable status options and rules
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_block (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- entity_table varchar(64) COMMENT 'Name for Membership Status',
- entity_id int unsigned NOT NULL COMMENT 'FK to civicrm_contribution_page.id',
- membership_types varchar(255) COMMENT 'Membership types to be exposed by this block',
- membership_type_default int unsigned COMMENT 'Optional foreign key to membership_type',
- display_min_fee tinyint DEFAULT 1 COMMENT 'Display minimum membership fee',
- is_separate_payment tinyint DEFAULT 1 COMMENT 'Should membership transactions be processed separately',
- new_title varchar(255) COMMENT 'Title to display at top of block',
- new_text text COMMENT 'Text to display below title',
- renewal_title varchar(255) COMMENT 'Title for renewal',
- renewal_text text COMMENT 'Text to display for member renewal',
- is_required tinyint DEFAULT 0 COMMENT 'Is membership sign up optional',
- is_active tinyint DEFAULT 1 COMMENT 'Is this membership_block enabled'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_entity_id ( entity_id ) ,
- FOREIGN KEY (entity_id) REFERENCES civicrm_contribution_page(id)
-, INDEX FKEY_membership_type_default ( membership_type_default ) ,
- FOREIGN KEY (membership_type_default) REFERENCES civicrm_membership_type(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_membership_log
--- *
--- * Logs actions which affect a Membership record (signup, status override, renewal, etc.)
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_log (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT ,
- membership_id int unsigned NOT NULL COMMENT 'FK to Membership table',
- status_id int unsigned NOT NULL COMMENT 'New status assigned to membership by this action. FK to Membership Status',
- start_date date COMMENT 'New membership period start date',
- end_date date COMMENT 'New membership period expiration date.',
- modified_id int unsigned COMMENT 'FK to Contact ID of person under whose credentials this data modification was made.',
- modified_date date COMMENT 'Date this membership modification action was logged.'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_membership_id ( membership_id ) ,
- FOREIGN KEY (membership_id) REFERENCES civicrm_membership(id)
-, INDEX FKEY_status_id ( status_id ) ,
- FOREIGN KEY (status_id) REFERENCES civicrm_membership_status(id)
-, INDEX FKEY_modified_id ( modified_id ) ,
- FOREIGN KEY (modified_id) REFERENCES civicrm_contact(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_membership_payment
--- *
--- * Membership Payment
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_payment (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT ,
- membership_id int unsigned NOT NULL COMMENT 'FK to Membership table',
- payment_entity_table varchar(128) COMMENT 'Table being referenced for payment entity.',
- payment_entity_id int unsigned COMMENT 'FK to table with payment record (expected usage is civicrm_contribution).'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_payment_entity(
- payment_entity_table
- , payment_entity_id
- )
-
-, INDEX FKEY_membership_id ( membership_id ) ,
- FOREIGN KEY (membership_id) REFERENCES civicrm_membership(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_option_group
--- *
--- *******************************************************/
-CREATE TABLE civicrm_option_group (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Group ID',
- domain_id int unsigned NOT NULL COMMENT 'Which domain owns this group of options.',
- name varchar(64) NOT NULL COMMENT 'Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.',
- description varchar(255) COMMENT 'Option group description.',
- is_reserved tinyint COMMENT 'Is this a predefined system option group (i.e. it can not be deleted)?',
- is_active tinyint COMMENT 'Is this option group active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX option_group_name_domain_id(
- name
- , domain_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_option_value
--- *
--- *******************************************************/
-CREATE TABLE civicrm_option_value (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
- option_group_id int unsigned NOT NULL COMMENT 'Group which this option belongs to.',
- label varchar(64) NOT NULL COMMENT 'Option string as displayed to users - e.g. the label in an HTML OPTION tag.',
- value int unsigned NOT NULL COMMENT 'The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key.',
- name varchar(64) COMMENT 'May be used to store an option string that is different from the display title. One use case is when a non-translated value needs to be set / sent to another application (e.g. for Credit Card type).',
- grouping varchar(64) COMMENT 'Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.',
- filter int unsigned NOT NULL COMMENT 'Bitwise logic can be used to create subsets of options within an option_group for different uses.',
- is_default tinyint DEFAULT 0 COMMENT 'Is this the default option for the group?',
- weight int unsigned NOT NULL COMMENT 'Controls display sort order.',
- description varchar(255) COMMENT 'Optional description.',
- is_optgroup tinyint DEFAULT 0 COMMENT 'Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?',
- is_reserved tinyint DEFAULT 0 COMMENT 'Is this a predefined system object?',
- is_active tinyint DEFAULT 1 COMMENT 'Is this option active?'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_option_group_id_value(
- value
- , option_group_id
- )
-
-, INDEX FKEY_option_group_id ( option_group_id ) ,
- FOREIGN KEY (option_group_id) REFERENCES civicrm_option_group(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_project
--- *
--- * Instantiate projects, programs, campaigns, etc.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_project (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Project ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this record.',
- title varchar(64) COMMENT 'Project name.',
- description text COMMENT 'Optional verbose description of the project. May be used for display - HTML allowed.',
- logo varchar(255) COMMENT 'Full or relative URL to optional uploaded logo image for project.',
- owner_entity_table varchar(64) NOT NULL COMMENT 'Name of table where project owner being referenced is stored (e.g. civicrm_contact or civicrm_group).',
- owner_entity_id int unsigned NOT NULL COMMENT 'Foreign key to project owner (contact, group, etc.).',
- start_date datetime COMMENT 'Project start date.',
- end_date datetime COMMENT 'Project end date.',
- is_active tinyint COMMENT 'Is this record active? For Projects: can tasks be created for it, does it appear on project listings, etc.',
- status_id int unsigned COMMENT 'Configurable status value (e.g. Planned, Active, Closed...). FK to civicrm_option_value.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_project_owner(
- id
- , owner_entity_table
- , owner_entity_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-, INDEX FKEY_status_id ( status_id ) ,
- FOREIGN KEY (status_id) REFERENCES civicrm_option_value(value)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_task
--- *
--- * To-do items. Can be assigned to self or other entities.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_task (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Task ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this record.',
- title varchar(64) COMMENT 'Task name.',
- description varchar(255) COMMENT 'Optional verbose description of the Task. May be used for display - HTML allowed.',
- task_type_id int unsigned COMMENT 'Configurable task type values (e.g. App Submit, App Review...). FK to civicrm_option_value.',
- owner_entity_table varchar(64) NOT NULL COMMENT 'Name of table where Task owner being referenced is stored (e.g. civicrm_contact or civicrm_group).',
- owner_entity_id int unsigned NOT NULL COMMENT 'Foreign key to Task owner (contact, group, etc.).',
- parent_entity_table varchar(64) COMMENT 'Name of table where optional Task parent is stored (e.g. civicrm_project, or civicrm_task for sub-tasks).',
- parent_entity_id int unsigned COMMENT 'Optional foreign key to Task Parent (project, another task, etc.).',
- due_date datetime COMMENT 'Task due date.',
- priority_id int unsigned COMMENT 'Configurable priority value (e.g. Critical, High, Medium...). FK to civicrm_option_value.',
- task_class varchar(255) COMMENT 'Optional key to a process class related to this task (e.g. CRM_Quest_PreApp).',
- is_active tinyint COMMENT 'Is this record active? For tasks: can it be assigned, does it appear on open task listings, etc.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_task_parent(
- id
- , parent_entity_table
- , parent_entity_id
- )
- , UNIQUE INDEX UI_task_owner(
- id
- , owner_entity_table
- , owner_entity_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-, INDEX FKEY_task_type_id ( task_type_id ) ,
- FOREIGN KEY (task_type_id) REFERENCES civicrm_option_value(value)
-, INDEX FKEY_priority_id ( priority_id ) ,
- FOREIGN KEY (priority_id) REFERENCES civicrm_option_value(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_task_status
--- *
--- * Tracks the responsible entity, optional target entity and status of a task. Tasks can have multiple task_status entries if assigned to multiple responsible entities and-or there are multiple targets.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_task_status (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Task ID',
- task_id int unsigned NOT NULL COMMENT 'Status is for which task.',
- responsible_entity_table varchar(64) NOT NULL COMMENT 'Entity responsible for this task_status instance (table where entity is stored e.g. civicrm_contact or civicrm_group).',
- responsible_entity_id int unsigned NOT NULL COMMENT 'Foreign key to responsible entity (contact, group, etc.).',
- target_entity_table varchar(64) NOT NULL COMMENT 'Optional target entity for this task_status instance, i.e. review this membership application-prospect member contact record is target (table where entity is stored e.g. civicrm_contact or civicrm_group).',
- target_entity_id int unsigned NOT NULL COMMENT 'Foreign key to target entity (contact, group, etc.).',
- status_detail text COMMENT 'Encoded array of status details used for programmatic progress reporting and tracking.',
- status_id int unsigned COMMENT 'Configurable status value (e.g. Not Started, In Progress, Completed, Deferred...). FK to civicrm_option_value.',
- create_date datetime COMMENT 'Date this record was created (date work on task started).',
- modified_date datetime COMMENT 'Date-time of last update to this task_status record.'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_task_status_responsible(
- task_id
- , responsible_entity_table
- , responsible_entity_id
- )
- , INDEX index_task_status_target(
- task_id
- , target_entity_table
- , target_entity_id
- )
-
-, INDEX FKEY_task_id ( task_id ) ,
- FOREIGN KEY (task_id) REFERENCES civicrm_task(id)
-, INDEX FKEY_status_id ( status_id ) ,
- FOREIGN KEY (status_id) REFERENCES civicrm_option_value(value)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_log
--- *
--- * Log can be linked to any object in the application.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_log (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
- entity_table varchar(64) NOT NULL COMMENT 'Name of table where item being referenced is stored.',
- entity_id int unsigned NOT NULL COMMENT 'Foreign key to the referenced item.',
- data text COMMENT 'Updates does to this object if any.',
- modified_id int unsigned COMMENT 'FK to Contact ID of person under whose credentials this data modification was made.',
- modified_date datetime COMMENT 'When was the referenced entity created or modified or deleted.'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
-
-, INDEX FKEY_modified_id ( modified_id ) ,
- FOREIGN KEY (modified_id) REFERENCES civicrm_contact(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_file
--- *
--- * Data store for uploaded (attached) files (pointer to file on disk OR blob). Maybe be joined to entities via custom_value.file_id or entity_file table.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_file (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
- file_type_id int unsigned COMMENT 'Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.',
- mime_type varchar(255) COMMENT 'mime type of the document',
- uri varchar(255) COMMENT 'uri of the file on disk',
- document mediumblob COMMENT 'contents of the document',
- description varchar(255) COMMENT 'Additional descriptive text regarding this attachment (optional).',
- upload_date datetime COMMENT 'Date and time that this attachment was uploaded or written to server.'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_file_type_id ( file_type_id ) ,
- FOREIGN KEY (file_type_id) REFERENCES civicrm_option_value(value)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_entity_file
--- *
--- * Attaches (joins) uploaded files (images, documents, etc.) to entities (Contacts, Groups, Actions).
--- *
--- *******************************************************/
-CREATE TABLE civicrm_entity_file (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
- entity_table varchar(64) COMMENT 'physical tablename for entity being joined to file, e.g. civicrm_contact',
- entity_id int unsigned NOT NULL COMMENT 'FK to entity table specified in entity_table column.',
- file_id int unsigned NOT NULL COMMENT 'FK to civicrm_file'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
- , INDEX index_entity_file_id(
- entity_table
- , entity_id
- , file_id
- )
-
-, INDEX FKEY_file_id ( file_id ) ,
- FOREIGN KEY (file_id) REFERENCES civicrm_file(id)
-
-) TYPE=InnoDB ;
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_individual Table Structure
--- *******************************************************/
-
- ALTER TABLE `civicrm_individual` ADD deceased_date date COMMENT 'Date of deceased';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contact Table Structure
--- *******************************************************/
- ALTER TABLE `civicrm_contact` DROP INDEX `index_sort_name`;
- ALTER TABLE `civicrm_contact` DROP `hash`;
-
- ALTER TABLE `civicrm_contact` ADD hash varchar(32) DEFAULT NULL COMMENT 'Key for validating requests related to this contact.';
- ALTER TABLE `civicrm_contact` ADD contact_sub_type varchar(64) DEFAULT NULL COMMENT 'May be used to over-ride contact view and edit templates.';
-
- ALTER TABLE `civicrm_contact` MODIFY preferred_communication_method varchar(255) DEFAULT NULL COMMENT 'What is the preferred mode of communication.';
-
- ALTER TABLE `civicrm_contact` ADD INDEX index_sort_name_domain(sort_name, domain_id, hash);
-
- ALTER TABLE `civicrm_contact` ADD INDEX index_hash_domain(hash, domain_id);
-
--- /*******************************************************
--- *
--- * fix preferred communication data
--- *******************************************************/
- SELECT @domain_id := id from civicrm_domain;
- INSERT INTO
- `civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
- VALUES
- (@domain_id, 'preferred_communication_method', 'Preferred Communication Method' , 0, 1);
- SELECT @option_group_id_pcm := max(id) from civicrm_option_group where name = 'preferred_communication_method';
-
- INSERT INTO
- `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
- VALUES
- (@option_group_id_pcm, 'Phone', 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'Email', 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'Postal Mail', 3, NULL, NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'SMS', 4, NULL, NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'Fax', 5, NULL, NULL, 0, NULL, 5, NULL, 0, 0, 1);
-
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Phone', 1);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Email', 2);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Postal Mail', 3);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'SMS', 4);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Fax', 5);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution_page Table Structure
--- *******************************************************/
- ALTER TABLE `civicrm_contribution_page` ADD amount_block_is_active tinyint unsigned DEFAULT 1 COMMENT 'Is this property active?';
- ALTER TABLE `civicrm_contribution_page` ADD goal_amount decimal(20,2) COMMENT 'The target goal for this page, allows people to build a goal meter';
- ALTER TABLE `civicrm_contribution_page` ADD is_thermometer int(4) unsigned DEFAULT 1 COMMENT 'Should this contribution have the thermometer block enabled?';
- ALTER TABLE `civicrm_contribution_page` ADD thermometer_title varchar(255) DEFAULT NULL COMMENT 'Title for contribution page thermometer block.';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution Table Structure
--- *******************************************************/
- ALTER TABLE `civicrm_contribution` ADD `contribution_page_id` int(10) unsigned DEFAULT NULL COMMENT 'The Contribution Page which triggered this contribution';
- ALTER TABLE `civicrm_contribution` ADD INDEX (`contribution_page_id`);
- ALTER TABLE `civicrm_contribution` ADD FOREIGN KEY (`contribution_page_id`) REFERENCES `civicrm_contribution_page`(`id`);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_field` CHANGE `html_type` `html_type` ENUM( 'Text', 'TextArea', 'Select', 'Multi-Select', 'Radio', 'CheckBox', 'Select Date', 'Select State/Province', 'Select Country','File') DEFAULT NULL COMMENT 'HTML types plus several built-in extended types.';
-
- ALTER TABLE `civicrm_custom_field` CHANGE `data_type` `data_type` ENUM('String', 'Int', 'Float', 'Money', 'Memo', 'Date', 'Boolean', 'StateProvince', 'Country', 'File') DEFAULT NULL COMMENT 'Controls location of data storage in extended_data table.';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` CHANGE `extends` `extends` ENUM( 'Contact', 'Individual', 'Household', 'Organization', 'Location', 'Address', 'Contribution', 'Activity', 'Phonecall', 'Meeting', 'Group','Relationship') DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_value Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_value` ADD file_id int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_file';
- ALTER TABLE `civicrm_custom_value` ADD INDEX (`file_id`);
- ALTER TABLE `civicrm_custom_value` ADD FOREIGN KEY (`file_id`) REFERENCES `civicrm_file`(`id`);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_email Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_email` ADD INDEX `UI_email` (`email`);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_mapping Table Structure
--- *
--- *******************************************************/
-
-
- ALTER TABLE `civicrm_mapping` CHANGE `mapping_type` `mapping_type` ENUM('Export', 'Import', 'Export Contributions', 'Import Contributions', 'Import Activity History', 'Search Builder') default NULL COMMENT 'Type of Mapping.';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_mapping_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_mapping_field` ADD grouping int(10) unsigned DEFAULT 1 COMMENT 'Used to group mapping_field records into related sets (e.g. for criteria sets in search builder mappings).';
-
- ALTER TABLE `civicrm_mapping_field` ADD operator ENUM('=','!=','>','<','>=','<=','IN','NOT IN','LIKE','NOT LIKE') DEFAULT NULL COMMENT 'SQL WHERE operator for search-builder mapping fields (search criteria).';
-
- ALTER TABLE `civicrm_mapping_field` ADD value varchar(255) DEFAULT NULL COMMENT 'SQL WHERE value for search-builder mapping fields.';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD add_to_group_id int unsigned DEFAULT NULL COMMENT 'foreign key to civicrm_group_id';
- ALTER TABLE `civicrm_uf_group` ADD INDEX (`add_to_group_id`);
- ALTER TABLE `civicrm_uf_group` ADD FOREIGN KEY (`add_to_group_id`) REFERENCES `civicrm_group` (`id`);
-
- ALTER TABLE `civicrm_uf_group` ADD add_captcha tinyint DEFAULT 0 COMMENT 'Should a CAPTCHA widget be included this Profile form.';
-
- ALTER TABLE `civicrm_uf_group` ADD cancel_URL varchar(255) DEFAULT NULL COMMENT 'Redirect to URL when Cancle button clik .';
- ALTER TABLE `civicrm_uf_group` ADD is_map tinyint DEFAULT 0 COMMENT 'Do we want to map results from this profile.';
- ALTER TABLE `civicrm_uf_group` ADD collapse_display int(10) unsigned DEFAULT 0 COMMENT 'Will this group be in collapsed or expanded mode on initial display ?';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_match Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_match` ADD INDEX `UI_uf_id` (`uf_id`);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_note Table Structure
--- *
--- *******************************************************/
-
-
- ALTER TABLE `civicrm_note` ADD `subject` varchar(255) DEFAULT NULL COMMENT 'subject of note description';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_relationship Table Structure
--- *
--- *******************************************************/
-
-
- ALTER TABLE `civicrm_relationship` ADD `description` varchar(255) COMMENT 'Optional verbose description for the relationship.' ;
-
--- /*******************************************************
--- *
--- * Modify the civicrm_saved_search Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_saved_search` ADD `mapping_id` INT UNSIGNED COMMENT 'Foreign key to civicrm_mapping used for saved search-builder searches.';
- ALTER TABLE `civicrm_saved_search` ADD INDEX (`mapping_id`);
- ALTER TABLE `civicrm_saved_search` ADD FOREIGN KEY (`mapping_id`) REFERENCES `civicrm_mapping` (`id`);
-
- ALTER TABLE `civicrm_saved_search` DROP FOREIGN KEY `civicrm_saved_search_ibfk_1`;
-
- ALTER TABLE `civicrm_saved_search` DROP `query`,
- DROP `domain_id`,
- DROP `is_active`;
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_value Table Structure
--- *
--- *******************************************************/
-
- UPDATE `civicrm_custom_value`, `civicrm_custom_field`
- SET `char_data` = CONCAT(char(1),`char_data`,char(1))
- WHERE `custom_field_id` = `civicrm_custom_field`.`id`
- AND `html_type` IN ('multi-Select','CheckBox');
-
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
-
--- /*******************************************************
--- *
--- * civicrm_membership_type
--- *
--- * Sites can configure multiple types of memberships. They encode the owner organization, fee, and the rules needed to set start and end (expire) dates when a member signs up for that type.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_type (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- name varchar(128) COMMENT 'Name of Membership Type',
- description varchar(255) COMMENT 'Description of Membership Type',
- member_of_contact_id int unsigned NOT NULL COMMENT 'Owner organization for this membership type. FK to Contact ID',
- contribution_type_id int unsigned NOT NULL COMMENT 'If membership is paid by a contribution - what contribution type should be used. FK to Contribution Type ID',
- minimum_fee decimal(20,2) DEFAULT 0 COMMENT 'Minimum fee for this membership (0 for free/complimentary memberships).',
- duration_unit enum('day', 'month', 'year', 'lifetime') COMMENT 'Unit in which membership period is expressed.',
- duration_interval int COMMENT 'Number of duration units in membership period (e.g. 1 year, 12 months).',
- period_type enum('rolling', 'fixed') COMMENT 'Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.',
- fixed_period_start_day int DEFAULT 0101 COMMENT 'For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.',
- fixed_period_rollover_day int DEFAULT 1231 COMMENT 'For fixed period memberships, signups after this day (mmdd) rollover to next period.',
- relationship_type_id int unsigned COMMENT 'FK to Relationship Type ID',
- visibility varchar(64) ,
- weight int ,
- is_active tinyint DEFAULT 1 COMMENT 'Is this membership_type enabled'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-,
- FOREIGN KEY (member_of_contact_id) REFERENCES civicrm_contact(id)
-,
- FOREIGN KEY (contribution_type_id) REFERENCES civicrm_contribution_type(id)
-,
- FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_membership_status
--- *
--- * Membership Status stores admin configurable rules for assigning status to memberships.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_status (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- name varchar(128) COMMENT 'Name for Membership Status',
- start_event enum('start_date', 'end_date', 'join_date') COMMENT 'Event when this status starts.',
- start_event_adjust_unit enum('day', 'month', 'year') COMMENT 'Unit used for adjusting from start_event.',
- start_event_adjust_interval int COMMENT 'Status range begins this many units from start_event.',
- end_event enum('start_date', 'end_date', 'join_date') COMMENT 'Event after which this status ends.',
- end_event_adjust_unit enum('day', 'month', 'year') COMMENT 'Unit used for adjusting from the ending event.',
- end_event_adjust_interval int COMMENT 'Status range ends this many units from end_event.',
- is_current_member tinyint COMMENT 'Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).',
- is_admin tinyint COMMENT 'Is this status for admin/manual assignment only.',
- weight int ,
- is_default tinyint COMMENT 'Assign this status to a membership record if no other status match is found.',
- is_active tinyint DEFAULT 1 COMMENT 'Is this membership_status enabled.'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_membership
--- *
--- * Contact Membership records.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- contact_id int unsigned NOT NULL COMMENT 'FK to Contact ID',
- membership_type_id int unsigned NOT NULL COMMENT 'FK to Membership Type',
- join_date date COMMENT 'Beginning of initial membership period (member since...).',
- start_date date COMMENT 'Beginning of current uninterrupted membership period.',
- end_date date COMMENT 'Current membership period expire date.',
- source varchar(128) ,
- status_id int unsigned NOT NULL COMMENT 'FK to Membership Status',
- is_override tinyint COMMENT 'Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-,
- FOREIGN KEY (membership_type_id) REFERENCES civicrm_membership_type(id)
-,
- FOREIGN KEY (status_id) REFERENCES civicrm_membership_status(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_membership_block
--- *
--- * A Membership Block stores admin configurable status options and rules
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_block (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id',
- entity_table varchar(64) COMMENT 'Name for Membership Status',
- entity_id int unsigned NOT NULL COMMENT 'FK to civicrm_contribution_page.id',
- membership_types varchar(255) COMMENT 'Membership types to be exposed by this block',
- membership_type_default int unsigned COMMENT 'Optional foreign key to membership_type',
- display_min_fee tinyint DEFAULT 1 COMMENT 'Display minimum membership fee',
- is_separate_payment tinyint DEFAULT 1 COMMENT 'Should membership transactions be processed separately',
- new_title varchar(255) COMMENT 'Title to display at top of block',
- new_text text COMMENT 'Text to display below title',
- renewal_title varchar(255) COMMENT 'Title for renewal',
- renewal_text text COMMENT 'Text to display for member renewal',
- is_required tinyint DEFAULT 0 COMMENT 'Is membership sign up optional',
- is_active tinyint DEFAULT 1 COMMENT 'Is this membership_block enabled'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (entity_id) REFERENCES civicrm_contribution_page(id)
-,
- FOREIGN KEY (membership_type_default) REFERENCES civicrm_membership_type(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_membership_log
--- *
--- * Logs actions which affect a Membership record (signup, status override, renewal, etc.)
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_log (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT ,
- membership_id int unsigned NOT NULL COMMENT 'FK to Membership table',
- status_id int unsigned NOT NULL COMMENT 'New status assigned to membership by this action. FK to Membership Status',
- start_date date COMMENT 'New membership period start date',
- end_date date COMMENT 'New membership period expiration date.',
- modified_id int unsigned COMMENT 'FK to Contact ID of person under whose credentials this data modification was made.',
- modified_date date COMMENT 'Date this membership modification action was logged.'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (membership_id) REFERENCES civicrm_membership(id)
-,
- FOREIGN KEY (status_id) REFERENCES civicrm_membership_status(id)
-,
- FOREIGN KEY (modified_id) REFERENCES civicrm_contact(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_membership_payment
--- *
--- * Membership Payment
--- *
--- *******************************************************/
-CREATE TABLE civicrm_membership_payment (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT ,
- membership_id int unsigned NOT NULL COMMENT 'FK to Membership table',
- payment_entity_table varchar(128) COMMENT 'Table being referenced for payment entity.',
- payment_entity_id int unsigned COMMENT 'FK to table with payment record (expected usage is civicrm_contribution).'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_payment_entity(
- payment_entity_table
- , payment_entity_id
- )
-
-,
- FOREIGN KEY (membership_id) REFERENCES civicrm_membership(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_option_group
--- *
--- *******************************************************/
-CREATE TABLE civicrm_option_group (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Group ID',
- domain_id int unsigned NOT NULL COMMENT 'Which domain owns this group of options.',
- name varchar(64) NOT NULL COMMENT 'Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.',
- description varchar(255) COMMENT 'Option group description.',
- is_reserved tinyint COMMENT 'Is this a predefined system option group (i.e. it can not be deleted)?',
- is_active tinyint COMMENT 'Is this option group active?'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX option_group_name_domain_id(
- name
- , domain_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_option_value
--- *
--- *******************************************************/
-CREATE TABLE civicrm_option_value (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
- option_group_id int unsigned NOT NULL COMMENT 'Group which this option belongs to.',
- label varchar(64) NOT NULL COMMENT 'Option string as displayed to users - e.g. the label in an HTML OPTION tag.',
- value int unsigned NOT NULL COMMENT 'The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key.',
- name varchar(64) COMMENT 'May be used to store an option string that is different from the display title. One use case is when a non-translated value needs to be set / sent to another application (e.g. for Credit Card type).',
- grouping varchar(64) COMMENT 'Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.',
- filter int unsigned NOT NULL COMMENT 'Bitwise logic can be used to create subsets of options within an option_group for different uses.',
- is_default tinyint DEFAULT 0 COMMENT 'Is this the default option for the group?',
- weight int unsigned NOT NULL COMMENT 'Controls display sort order.',
- description varchar(255) COMMENT 'Optional description.',
- is_optgroup tinyint DEFAULT 0 COMMENT 'Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?',
- is_reserved tinyint DEFAULT 0 COMMENT 'Is this a predefined system object?',
- is_active tinyint DEFAULT 1 COMMENT 'Is this option active?'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_option_group_id_value(
- value
- , option_group_id
- )
-
-,
- FOREIGN KEY (option_group_id) REFERENCES civicrm_option_group(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_project
--- *
--- * Instantiate projects, programs, campaigns, etc.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_project (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Project ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this record.',
- title varchar(64) COMMENT 'Project name.',
- description text COMMENT 'Optional verbose description of the project. May be used for display - HTML allowed.',
- logo varchar(255) COMMENT 'Full or relative URL to optional uploaded logo image for project.',
- owner_entity_table varchar(64) NOT NULL COMMENT 'Name of table where project owner being referenced is stored (e.g. civicrm_contact or civicrm_group).',
- owner_entity_id int unsigned NOT NULL COMMENT 'Foreign key to project owner (contact, group, etc.).',
- start_date datetime COMMENT 'Project start date.',
- end_date datetime COMMENT 'Project end date.',
- is_active tinyint COMMENT 'Is this record active? For Projects: can tasks be created for it, does it appear on project listings, etc.',
- status_id int unsigned COMMENT 'Configurable status value (e.g. Planned, Active, Closed...). FK to civicrm_option_value.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_project_owner(
- id
- , owner_entity_table
- , owner_entity_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-,
- FOREIGN KEY (status_id) REFERENCES civicrm_option_value(value)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_task
--- *
--- * To-do items. Can be assigned to self or other entities.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_task (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Task ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this record.',
- title varchar(64) COMMENT 'Task name.',
- description varchar(255) COMMENT 'Optional verbose description of the Task. May be used for display - HTML allowed.',
- task_type_id int unsigned COMMENT 'Configurable task type values (e.g. App Submit, App Review...). FK to civicrm_option_value.',
- owner_entity_table varchar(64) NOT NULL COMMENT 'Name of table where Task owner being referenced is stored (e.g. civicrm_contact or civicrm_group).',
- owner_entity_id int unsigned NOT NULL COMMENT 'Foreign key to Task owner (contact, group, etc.).',
- parent_entity_table varchar(64) COMMENT 'Name of table where optional Task parent is stored (e.g. civicrm_project, or civicrm_task for sub-tasks).',
- parent_entity_id int unsigned COMMENT 'Optional foreign key to Task Parent (project, another task, etc.).',
- due_date datetime COMMENT 'Task due date.',
- priority_id int unsigned COMMENT 'Configurable priority value (e.g. Critical, High, Medium...). FK to civicrm_option_value.',
- task_class varchar(255) COMMENT 'Optional key to a process class related to this task (e.g. CRM_Quest_PreApp).',
- is_active tinyint COMMENT 'Is this record active? For tasks: can it be assigned, does it appear on open task listings, etc.'
-,
- PRIMARY KEY ( id )
-
- , UNIQUE INDEX UI_task_parent(
- id
- , parent_entity_table
- , parent_entity_id
- )
- , UNIQUE INDEX UI_task_owner(
- id
- , owner_entity_table
- , owner_entity_id
- )
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-,
- FOREIGN KEY (task_type_id) REFERENCES civicrm_option_value(value)
-,
- FOREIGN KEY (priority_id) REFERENCES civicrm_option_value(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_task_status
--- *
--- * Tracks the responsible entity, optional target entity and status of a task. Tasks can have multiple task_status entries if assigned to multiple responsible entities and-or there are multiple targets.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_task_status (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Task ID',
- task_id int unsigned NOT NULL COMMENT 'Status is for which task.',
- responsible_entity_table varchar(64) NOT NULL COMMENT 'Entity responsible for this task_status instance (table where entity is stored e.g. civicrm_contact or civicrm_group).',
- responsible_entity_id int unsigned NOT NULL COMMENT 'Foreign key to responsible entity (contact, group, etc.).',
- target_entity_table varchar(64) NOT NULL COMMENT 'Optional target entity for this task_status instance, i.e. review this membership application-prospect member contact record is target (table where entity is stored e.g. civicrm_contact or civicrm_group).',
- target_entity_id int unsigned NOT NULL COMMENT 'Foreign key to target entity (contact, group, etc.).',
- status_detail text COMMENT 'Encoded array of status details used for programmatic progress reporting and tracking.',
- status_id int unsigned COMMENT 'Configurable status value (e.g. Not Started, In Progress, Completed, Deferred...). FK to civicrm_option_value.',
- create_date datetime COMMENT 'Date this record was created (date work on task started).',
- modified_date datetime COMMENT 'Date-time of last update to this task_status record.'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_task_status_responsible(
- task_id
- , responsible_entity_table
- , responsible_entity_id
- )
- , INDEX index_task_status_target(
- task_id
- , target_entity_table
- , target_entity_id
- )
-
-,
- FOREIGN KEY (task_id) REFERENCES civicrm_task(id)
-,
- FOREIGN KEY (status_id) REFERENCES civicrm_option_value(value)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_log
--- *
--- * Log can be linked to any object in the application.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_log (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
- entity_table varchar(64) NOT NULL COMMENT 'Name of table where item being referenced is stored.',
- entity_id int unsigned NOT NULL COMMENT 'Foreign key to the referenced item.',
- data text COMMENT 'Updates does to this object if any.',
- modified_id int unsigned COMMENT 'FK to Contact ID of person under whose credentials this data modification was made.',
- modified_date datetime COMMENT 'When was the referenced entity created or modified or deleted.'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
-
-,
- FOREIGN KEY (modified_id) REFERENCES civicrm_contact(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_file
--- *
--- * Data store for uploaded (attached) files (pointer to file on disk OR blob). Maybe be joined to entities via custom_value.file_id or entity_file table.
--- *
--- *******************************************************/
-CREATE TABLE civicrm_file (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
- file_type_id int unsigned COMMENT 'Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.',
- mime_type varchar(255) COMMENT 'mime type of the document',
- uri varchar(255) COMMENT 'uri of the file on disk',
- document mediumblob COMMENT 'contents of the document',
- description varchar(255) COMMENT 'Additional descriptive text regarding this attachment (optional).',
- upload_date datetime COMMENT 'Date and time that this attachment was uploaded or written to server.'
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (file_type_id) REFERENCES civicrm_option_value(value)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_entity_file
--- *
--- * Attaches (joins) uploaded files (images, documents, etc.) to entities (Contacts, Groups, Actions).
--- *
--- *******************************************************/
-CREATE TABLE civicrm_entity_file (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
- entity_table varchar(64) COMMENT 'physical tablename for entity being joined to file, e.g. civicrm_contact',
- entity_id int unsigned NOT NULL COMMENT 'FK to entity table specified in entity_table column.',
- file_id int unsigned NOT NULL COMMENT 'FK to civicrm_file'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_entity(
- entity_table
- , entity_id
- )
- , INDEX index_entity_file_id(
- entity_table
- , entity_id
- , file_id
- )
-
-,
- FOREIGN KEY (file_id) REFERENCES civicrm_file(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_individual Table Structure
--- *******************************************************/
-
- ALTER TABLE `civicrm_individual` ADD deceased_date date COMMENT 'Date of deceased';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contact Table Structure
--- *******************************************************/
- ALTER TABLE `civicrm_contact` DROP INDEX `index_sort_name`;
- ALTER TABLE `civicrm_contact` DROP `hash`;
-
- ALTER TABLE `civicrm_contact` ADD hash varchar(32) DEFAULT NULL COMMENT 'Key for validating requests related to this contact.';
- ALTER TABLE `civicrm_contact` ADD contact_sub_type varchar(64) DEFAULT NULL COMMENT 'May be used to over-ride contact view and edit templates.';
-
- ALTER TABLE `civicrm_contact` MODIFY preferred_communication_method varchar(255) DEFAULT NULL COMMENT 'What is the preferred mode of communication.';
-
- ALTER TABLE `civicrm_contact` ADD INDEX index_sort_name_domain(sort_name, domain_id, hash);
-
- ALTER TABLE `civicrm_contact` ADD INDEX index_hash_domain(hash, domain_id);
-
--- /*******************************************************
--- *
--- * fix preferred communication data
--- *******************************************************/
- SELECT @domain_id := id from civicrm_domain;
- INSERT INTO
- `civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
- VALUES
- (@domain_id, 'preferred_communication_method', 'Preferred Communication Method' , 0, 1);
- SELECT @option_group_id_pcm := max(id) from civicrm_option_group where name = 'preferred_communication_method';
-
- INSERT INTO
- `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
- VALUES
- (@option_group_id_pcm, 'Phone', 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'Email', 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'Postal Mail', 3, NULL, NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'SMS', 4, NULL, NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_pcm, 'Fax', 5, NULL, NULL, 0, NULL, 5, NULL, 0, 0, 1);
-
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Phone', 1);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Email', 2);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Post', 3);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'SMS', 4);
- UPDATE civicrm_contact SET preferred_communication_method = REPLACE( preferred_communication_method, 'Fax', 5);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution_page Table Structure
--- *******************************************************/
- ALTER TABLE `civicrm_contribution_page` ADD amount_block_is_active tinyint unsigned DEFAULT 1 COMMENT 'Is this property active?';
- ALTER TABLE `civicrm_contribution_page` ADD goal_amount decimal(20,2) COMMENT 'The target goal for this page, allows people to build a goal meter';
- ALTER TABLE `civicrm_contribution_page` ADD is_thermometer int(4) unsigned DEFAULT 1 COMMENT 'Should this contribution have the thermometer block enabled?';
- ALTER TABLE `civicrm_contribution_page` ADD thermometer_title varchar(255) DEFAULT NULL COMMENT 'Title for contribution page thermometer block.';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_contribution Table Structure
--- *******************************************************/
- ALTER TABLE `civicrm_contribution` ADD `contribution_page_id` int(10) unsigned DEFAULT NULL COMMENT 'The Contribution Page which triggered this contribution';
- ALTER TABLE `civicrm_contribution` ADD INDEX (`contribution_page_id`);
- ALTER TABLE `civicrm_contribution` ADD FOREIGN KEY (`contribution_page_id`) REFERENCES `civicrm_contribution_page`(`id`);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_field Table Structure
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_field` CHANGE `html_type` `html_type` ENUM( 'Text', 'TextArea', 'Select', 'Multi-Select', 'Radio', 'CheckBox', 'Select Date', 'Select State/Province', 'Select Country','File') DEFAULT NULL COMMENT 'HTML types plus several built-in extended types.';
-
- ALTER TABLE `civicrm_custom_field` CHANGE `data_type` `data_type` ENUM('String', 'Int', 'Float', 'Money', 'Memo', 'Date', 'Boolean', 'StateProvince', 'Country', 'File') DEFAULT NULL COMMENT 'Controls location of data storage in extended_data table.';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` CHANGE `extends` `extends` ENUM( 'Contact', 'Individual', 'Household', 'Organization', 'Location', 'Address', 'Contribution', 'Activity', 'Phonecall', 'Meeting', 'Group','Relationship') DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_value Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_value` ADD file_id int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_file';
- ALTER TABLE `civicrm_custom_value` ADD INDEX (`file_id`);
- ALTER TABLE `civicrm_custom_value` ADD FOREIGN KEY (`file_id`) REFERENCES `civicrm_file`(`id`);
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_email Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_email` ADD INDEX `UI_email` (`email`);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_mapping Table Structure
--- *
--- *******************************************************/
-
-
- ALTER TABLE `civicrm_mapping` CHANGE `mapping_type` `mapping_type` ENUM('Export', 'Import', 'Export Contributions', 'Import Contributions', 'Import Activity History', 'Search Builder') default NULL COMMENT 'Type of Mapping.';
-
-
--- /*******************************************************
--- *
--- * Modify the civicrm_mapping_field Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_mapping_field` ADD grouping int(10) unsigned DEFAULT 1 COMMENT 'Used to group mapping_field records into related sets (e.g. for criteria sets in search builder mappings).';
-
- ALTER TABLE `civicrm_mapping_field` ADD operator ENUM('=','!=','>','<','>=','<=','IN','NOT IN','LIKE','NOT LIKE') DEFAULT NULL COMMENT 'SQL WHERE operator for search-builder mapping fields (search criteria).';
-
- ALTER TABLE `civicrm_mapping_field` ADD value varchar(255) DEFAULT NULL COMMENT 'SQL WHERE value for search-builder mapping fields.';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_group Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD add_to_group_id int unsigned DEFAULT NULL COMMENT 'foreign key to civicrm_group_id';
- ALTER TABLE `civicrm_uf_group` ADD INDEX (`add_to_group_id`);
- ALTER TABLE `civicrm_uf_group` ADD FOREIGN KEY (`add_to_group_id`) REFERENCES `civicrm_group` (`id`);
-
- ALTER TABLE `civicrm_uf_group` ADD add_captcha tinyint DEFAULT 0 COMMENT 'Should a CAPTCHA widget be included this Profile form.';
-
- ALTER TABLE `civicrm_uf_group` ADD cancel_URL varchar(255) DEFAULT NULL COMMENT 'Redirect to URL when Cancle button clik .';
- ALTER TABLE `civicrm_uf_group` ADD is_map tinyint DEFAULT 0 COMMENT 'Do we want to map results from this profile.';
- ALTER TABLE `civicrm_uf_group` ADD collapse_display int(10) unsigned DEFAULT 0 COMMENT 'Will this group be in collapsed or expanded mode on initial display ?';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_uf_match Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_match` ADD INDEX `UI_uf_id` (`uf_id`);
-
--- /*******************************************************
--- *
--- * Modify the civicrm_note Table Structure
--- *
--- *******************************************************/
-
-
- ALTER TABLE `civicrm_note` ADD `subject` varchar(255) DEFAULT NULL COMMENT 'subject of note description';
-
--- /*******************************************************
--- *
--- * Modify the civicrm_relationship Table Structure
--- *
--- *******************************************************/
-
-
- ALTER TABLE `civicrm_relationship` ADD `description` varchar(255) COMMENT 'Optional verbose description for the relationship.' ;
-
--- /*******************************************************
--- *
--- * Modify the civicrm_saved_search Table Structure
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_saved_search` ADD `mapping_id` INT UNSIGNED COMMENT 'Foreign key to civicrm_mapping used for saved search-builder searches.';
- ALTER TABLE `civicrm_saved_search` ADD INDEX (`mapping_id`);
- ALTER TABLE `civicrm_saved_search` ADD FOREIGN KEY (`mapping_id`) REFERENCES `civicrm_mapping` (`id`);
-
- ALTER TABLE `civicrm_saved_search` DROP FOREIGN KEY `civicrm_saved_search_ibfk_1`;
-
- ALTER TABLE `civicrm_saved_search` DROP `query`,
- DROP `domain_id`,
- DROP `is_active`;
--- /*******************************************************
--- *
--- * Modify the civicrm_custom_value Table Structure
--- *
--- *******************************************************/
-
- SET NAMES utf8;
- UPDATE `civicrm_custom_value`, `civicrm_custom_field`
- SET `char_data` = CONCAT(char(1),`char_data`,char(1))
- WHERE `custom_field_id` = `civicrm_custom_field`.`id`
- AND `html_type` IN ('multi-Select','CheckBox');
-
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- All domain-keyed values handled by this included file
--- Handles all domain-keyed data. Included in civicrm_data.tpl for base initialization (@domain_id = 1).
--- *******************************************************/
-
- set @domain_id = 1;
-
--- /*******************************************************
--- *
--- * update the option group and option value
--- *
--- *******************************************************/
-
-INSERT INTO
- `civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
-VALUES
- (@domain_id, 'activity_type' , 'Activity Type' , 0, 1),
- (@domain_id, 'gender' , 'Gender' , 0, 1),
- (@domain_id, 'instant_messenger_service' , 'Instant Messenger (IM) screen-names', 0, 1),
- (@domain_id, 'mobile_provider' , 'Mobile Phone Providers' , 0, 1),
- (@domain_id, 'individual_prefix' , 'Individual contact prefixes.' , 0, 1),
- (@domain_id, 'individual_suffix' , 'Individual contact suffixes.' , 0, 1),
- (@domain_id, 'acl_role' , 'ACL Role.' , 0, 1),
- (@domain_id, 'accept_creditcard' , 'Accept Credit Card' , 0, 1),
- (@domain_id, 'payment_instrument' , 'Payment Instrument' , 0, 1),
- (@domain_id, 'contribution_status' , 'Contribution Status' , 0, 1);
-
-SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
-SELECT @option_group_id_gender := max(id) from civicrm_option_group where name = 'gender';
-SELECT @option_group_id_IMProvider := max(id) from civicrm_option_group where name = 'instant_messenger_service';
-SELECT @option_group_id_mobileProvider := max(id) from civicrm_option_group where name = 'mobile_provider';
-SELECT @option_group_id_prefix := max(id) from civicrm_option_group where name = 'individual_prefix';
-SELECT @option_group_id_suffix := max(id) from civicrm_option_group where name = 'individual_suffix';
-SELECT @option_group_id_aclRole := max(id) from civicrm_option_group where name = 'acl_role';
-SELECT @option_group_id_acc := max(id) from civicrm_option_group where name = 'accept_creditcard';
-SELECT @option_group_id_pi := max(id) from civicrm_option_group where name = 'payment_instrument';
-SELECT @option_group_id_cs := max(id) from civicrm_option_group where name = 'contribution_status';
-
-INSERT INTO
- `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
-VALUES
- (@option_group_id_act, 'Meeting', 1, 'Meeting',NULL, 0, NULL, 1, 'Schedule a meeting', 0, 0, 1),
- (@option_group_id_act, 'Phone Call', 2, 'Phone Call', NULL, 0, NULL, 2, 'Schedule a Phone Call', 0, 0, 1),
- (@option_group_id_act, 'Email', 3, 'Email', NULL, 0, NULL, 3, 'Email Sent', 0, 0, 1),
- (@option_group_id_act, 'SMS', 4, 'SMS', NULL, 0, NULL, 4, 'SMS', 0, 0, 1),
- (@option_group_id_act, 'Event', 5,'Event', NULL, 0, NULL, 5, 'Event', 0, 0, 1),
-
- (@option_group_id_gender, 'Female', 1, 'Female', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_gender, 'Male', 2, 'Male', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_gender, 'Transgender', 3, 'Transgender', NULL, 0, NULL, 3, NULL, 0, 0, 1),
-
- (@option_group_id_IMProvider, 'Yahoo', 1, 'Yahoo', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'MSN', 2, 'Msn', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'AIM', 3, 'Aim', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'GTalk', 4, 'Gtalk', NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'Jabber',5, 'Jabber',NULL, 0, NULL, 5, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'Skype', 6, 'Skype', NULL, 0, NULL, 6, NULL, 0, 0, 1),
-
- (@option_group_id_mobileProvider, 'Sprint' , 1, 'Sprint' , NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_mobileProvider, 'Verizon' , 2, 'Verizon' , NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_mobileProvider, 'Cingular', 3, 'Cingular', NULL, 0, NULL, 3, NULL, 0, 0, 1),
-
- (@option_group_id_prefix, 'Mrs', 1, 'Mrs', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_prefix, 'Ms', 2, 'Ms', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_prefix, 'Mr', 3, 'Mr', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_prefix, 'Dr', 4, 'Dr', NULL, 0, NULL, 4, NULL, 0, 0, 1),
-
- (@option_group_id_suffix, 'Jr', 1, 'Jr', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'Sr', 2, 'Sr', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'II', 3, 'II', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'III', 4, 'III', NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'IV', 5, 'IV', NULL, 0, NULL, 5, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'V', 6, 'V', NULL, 0, NULL, 6, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'VI', 7, 'VI', NULL, 0, NULL, 7, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'VII', 8, 'VII', NULL, 0, NULL, 8, NULL, 0, 0, 1),
-
- (@option_group_id_aclRole, 'Administrator', 1, 'Admin', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_aclRole, 'Authenticated', 2, 'Auth' , NULL, 0, NULL, 2, NULL, 0, 0, 1),
-
- (@option_group_id_acc, 'Visa', 1, 'Visa', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_acc, 'MasterCard', 2, 'MasterCard', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_acc, 'American Express', 3, 'American Express', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_acc, 'Discover', 4, 'Discover', NULL, 0, NULL, 4, NULL, 0, 0, 1),
-
- (@option_group_id_pi, 'Credit Card', 1, 'Credit Card', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_pi, 'Debit Card', 2, 'Debit Card', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_pi, 'Cash', 3, 'Cash', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_pi, 'Check', 4, 'Check', NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_pi, 'EFT', 5, 'EFT', NULL, 0, NULL, 5, NULL, 0, 0, 1),
-
- (@option_group_id_cs, 'Completed', 1, 'Completed', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_cs, 'Pending' , 2, 'Pending' , NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_cs, 'Cancelled', 3, 'Cancelled', NULL, 0, NULL, 3, NULL, 0, 0, 1);
-
--- /*******************************************************
--- *
--- * add the Netherlands state of Limburg (CRM-1228)
--- *
--- *******************************************************/
-
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (5176, 1152, "LI", "Limburg");
-
--- /*******************************************************
--- *
--- * update the province list (CRM-1271)
--- *
--- *******************************************************/
-
- UPDATE civicrm_state_province SET name="Co Antrim" WHERE id=2595;
- UPDATE civicrm_state_province SET name="Co Armagh" WHERE id=2598;
- UPDATE civicrm_state_province SET name="Bristol" WHERE id=2620;
- UPDATE civicrm_state_province SET name="Co Down" WHERE id=2652;
- UPDATE civicrm_state_province SET name="Co Durham" WHERE id=2657;
- UPDATE civicrm_state_province SET name="Co Fermanagh" WHERE id=2670;
- UPDATE civicrm_state_province SET name="Glasgow" WHERE id=2674;
- UPDATE civicrm_state_province SET name="Herefordshire" WHERE id=2687;
- UPDATE civicrm_state_province SET name="Kingston upon Hull" WHERE id=2700;
- UPDATE civicrm_state_province SET name="North Ayrshire" WHERE id=2735;
- UPDATE civicrm_state_province SET name="Cleveland" WHERE id=2760;
- UPDATE civicrm_state_province SET name="Rhondda Cynon Taff" WHERE id=2762;
- UPDATE civicrm_state_province SET name="Scottish Borders" WHERE id=2770;
- UPDATE civicrm_state_province SET name="Vale of Glamorgan" WHERE id=2804;
-
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9000, 1196, "NW", "North West" );
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9986, 1226, "xTYW", "Tyne and Wear");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9987, 1226, "xIOM", "Isle of Man");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9988, 1226, "xGMA", "Greater Manchester");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9989, 1226, "xTYR", "Co Tyrone");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9990, 1226, "xWYO", "West Yorkshire");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9991, 1226, "xSYO", "South Yorkshire");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9992, 1226, "xMSD", "Merseyside");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9993, 1226, "xBRK", "Berkshire");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9994, 1226, "xWMD", "West Midlands");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9995, 1226, "xIVN", "Inverness");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9996, 1226, "xAVN", "Avon");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9997, 1226, "xMDX", "Middlesex");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9998, 1226, "xWGM", "West Glamorgan");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9999, 1226, "xLON", "London");
-
-
--- /*******************************************************
--- *
--- * update database (CRM-1275)
--- *
--- *******************************************************/
-
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-
--- /*******************************************************
--- *
--- * Clean up the exisiting tables
--- *
--- *******************************************************/
-
-DROP TABLE IF EXISTS civicrm_accept_credit_card;
-DROP TABLE IF EXISTS civicrm_activity_type;
-DROP TABLE IF EXISTS civicrm_acl_group;
-DROP TABLE IF EXISTS civicrm_acl_group_join;
-DROP TABLE IF EXISTS civicrm_gender;
-DROP TABLE IF EXISTS civicrm_individual_prefix;
-DROP TABLE IF EXISTS civicrm_individual_suffix;
-DROP TABLE IF EXISTS civicrm_im_provider;
-DROP TABLE IF EXISTS civicrm_mobile_provider;
-DROP TABLE IF EXISTS civicrm_payment_instrument;
-
-
--- /*******************************************************
--- *
--- * civicrm_acl_cache
--- *
--- * Cache for acls and contacts
--- *
--- *******************************************************/
-CREATE TABLE civicrm_acl_cache (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique table ID',
- contact_id int unsigned COMMENT 'Foreign Key to Contact',
- acl_id int unsigned NOT NULL COMMENT 'Foreign Key to ACL',
- modified_date date COMMENT 'When was this cache entry last modified'
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_contact_id ( contact_id ) ,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-, INDEX FKEY_acl_id ( acl_id ) ,
- FOREIGN KEY (acl_id) REFERENCES civicrm_acl(id)
-, INDEX index_acl_id( acl_id)
-
-) TYPE=InnoDB;
-
--- /*******************************************************
--- *
--- * civicrm_acl_entity_role
--- *
--- * Join table for Contacts and Groups to ACL Roles
--- *
--- *******************************************************/
-CREATE TABLE civicrm_acl_entity_role (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique table ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- acl_role_id int unsigned NOT NULL COMMENT 'Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)',
- entity_table varchar(64) NOT NULL COMMENT 'Table of the object joined to the ACL Role (Contact or Group)',
- entity_id int unsigned NOT NULL COMMENT 'ID of the group/contact object being joined',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_role(
- acl_role_id
- )
- , INDEX index_entity(
- entity_table
- , entity_id
- )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_msg_template
--- *
--- * Users will need a way to save and retrieve templates with tokens for use in recurring email communication tasks
--- *
--- *******************************************************/
-CREATE TABLE civicrm_msg_template (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Message Template ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- msg_title varchar(255) COMMENT 'Descriptive title of message',
- msg_subject varchar(255) COMMENT 'Subject for email message.',
- msg_text text COMMENT 'Text formatted message',
- msg_html text COMMENT 'HTML formatted message',
- is_active tinyint DEFAULT 1
-,
- PRIMARY KEY ( id )
-
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * Modify the civicrm_acl Table Structure
--- *******************************************************/
-
- ALTER TABLE `civicrm_acl` ADD domain_id int unsigned NOT NULL DEFAULT '0' COMMENT 'Which Domain owns this contact';
- ALTER TABLE `civicrm_acl` ADD INDEX FKEY_domain_id (domain_id);
- ALTER TABLE `civicrm_acl` ADD FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id);
-
- ALTER TABLE `civicrm_acl` ADD name varchar(64) COMMENT 'ACL Name.';
-
- ALTER TABLE `civicrm_acl` CHANGE `operation` `operation` ENUM('All', 'View', 'Edit', 'Create', 'Delete', 'Grant', 'Revoke') NOT NULL COMMENT 'What operation does this ACL entry control?';
-
- ALTER TABLE `civicrm_acl` ADD is_active tinyint(4) COMMENT 'Is this property active?';
-
- ALTER TABLE `civicrm_acl` ADD INDEX index_acl_id (acl_id);
-
--- /*******************************************************
--- *
--- * civicrm_activity
--- *
--- * Join table for activities
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_activity` ADD INDEX UI_activity_type_id (`activity_type_id`);
- ALTER TABLE `civicrm_activity` DROP FOREIGN KEY `civicrm_activity_ibfk_2`;
- ALTER TABLE `civicrm_activity` DROP INDEX `FKEY_activity_type_id`;
-
--- /*******************************************************
--- *
--- * civicrm_activity_history
--- *
--- * Record history for an entity in the crm module
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_activity_history` ADD INDEX index_activity (`activity_id`);
-
--- /*******************************************************
--- *
--- * civicrm_contact
--- *
--- * Three types of contacts are defined: Individual, Organization and Household. Contact objects are defined by a civicrm_contact record plus a related civicrm_contact_type record.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_contact ADD INDEX index_contact_type_domain (contact_type, domain_id);
- ALTER TABLE civicrm_contact ADD INDEX index_contact_sub_type_domain (contact_sub_type, domain_id);
- ALTER TABLE civicrm_contact ADD INDEX index_preferred_communication_method (preferred_communication_method);
-
- UPDATE civicrm_contact
- SET `preferred_communication_method` = CONCAT(char(1),`preferred_communication_method`,char(1))
- WHERE civicrm_contact.preferred_communication_method IS NOT NULL;
-
--- /*******************************************************
--- *
--- * civicrm_contribution
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution` ADD `contribution_status_id` int unsigned DEFAULT '1';
- ALTER TABLE `civicrm_contribution` DROP FOREIGN KEY `civicrm_contribution_ibfk_6`;
- ALTER TABLE `civicrm_contribution` DROP FOREIGN KEY `civicrm_contribution_ibfk_7`;
- ALTER TABLE `civicrm_contribution` DROP INDEX `FKEY_payment_instrument_id`;
- ALTER TABLE `civicrm_contribution` DROP INDEX `FKEY_recur_contribution_id`;
-
- ALTER TABLE `civicrm_contribution` DROP recur_contribution_id;
-
- ALTER TABLE `civicrm_contribution` ADD is_test tinyint NULL DEFAULT 0;
- ALTER TABLE `civicrm_contribution` ADD `honor_contact_id` int unsigned COMMENT 'FK to contact ID';
- ALTER TABLE `civicrm_contribution` ADD contribution_recur_id int unsigned AFTER note;
- ALTER TABLE `civicrm_contribution` ADD INDEX FKEY_contribution_recur_id (contribution_recur_id);
- ALTER TABLE `civicrm_contribution` ADD CONSTRAINT FOREIGN KEY (`contribution_recur_id`) REFERENCES civicrm_contribution_recur (`id`);
-
- ALTER TABLE `civicrm_contribution` ADD INDEX `UI_contrib_payment_instrument_id`(payment_instrument_id);
- ALTER TABLE `civicrm_contribution` ADD INDEX `index_contribution_status` (contribution_status_id);
- ALTER TABLE `civicrm_contribution` ADD INDEX FKEY_honor_contact_id (honor_contact_id);
- ALTER TABLE `civicrm_contribution` ADD CONSTRAINT FOREIGN KEY (`honor_contact_id`) REFERENCES `civicrm_contact` (`id`);
-
- UPDATE civicrm_contribution SET contribution_status_id=3 WHERE cancel_date IS NOT NULL;
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- * A Contribution object store meta information about a single customized contribution page
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution_page` ADD honor_block_is_active tinyint COMMENT 'Should this contribution have the honor block enabled?';
- ALTER TABLE `civicrm_contribution_page` ADD honor_block_title varchar(255) COMMENT 'Title for honor block.';
- ALTER TABLE `civicrm_contribution_page` ADD honor_block_text text COMMENT 'text for honor block.';
- ALTER TABLE `civicrm_contribution_page` ADD is_monetary tinyint DEFAULT '1' COMMENT 'if true - allows real-time monetary transactions otherwise non-monetary transactions.';
- ALTER TABLE `civicrm_contribution_page` ADD is_recur tinyint NULL DEFAULT '0' AFTER is_monetary;
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution_recur
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution_recur` ADD domain_id int unsigned NOT NULL DEFAULT '0' COMMENT 'Which Domain owns this contact';
- ALTER TABLE `civicrm_contribution_recur` ADD trxn_id varchar(255) COMMENT 'unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method';
- ALTER TABLE `civicrm_contribution_recur` ADD invoice_id varchar(255) COMMENT 'unique invoice id, system generated or passed in';
- ALTER TABLE `civicrm_contribution_recur` ADD contribution_status_id int unsigned NULL DEFAULT '1' AFTER invoice_id;
- ALTER TABLE `civicrm_contribution_recur` ADD end_date datetime NOT NULL AFTER cancel_date;
- ALTER TABLE `civicrm_contribution_recur` ADD is_test tinyint NULL DEFAULT '0' AFTER contribution_status_id;
-
- ALTER TABLE `civicrm_contribution_recur` MODIFY start_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
- ALTER TABLE `civicrm_contribution_recur` MODIFY create_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
- ALTER TABLE `civicrm_contribution_recur` MODIFY modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
- ALTER TABLE `civicrm_contribution_recur` MODIFY cancel_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
- ALTER TABLE `civicrm_contribution_recur` MODIFY next_sched_contribution datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
- ALTER TABLE `civicrm_contribution_recur` MODIFY failure_retry_date datetime NULL DEFAULT NULL;
-
- ALTER TABLE `civicrm_contribution_recur` DROP is_active;
-
- ALTER TABLE `civicrm_contribution_recur` ADD INDEX FKEY_domain_id (domain_id);
- ALTER TABLE `civicrm_contribution_recur` ADD INDEX index_contribution_status (contribution_status_id);
- ALTER TABLE `civicrm_contribution_recur` ADD FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id);
-
--- /*******************************************************
--- *
--- * civicrm_custom_group
--- *
--- * All extended (custom) properties are associated with a group. These are logical sets of related data.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` ADD extends_entity_column_name varchar(64) COMMENT 'linking custom group for dynamic object';
- ALTER TABLE `civicrm_custom_group` ADD extends_entity_column_value varchar(64) COMMENT 'linking custom group for dynamic object';
-
- ALTER TABLE `civicrm_custom_group` MODIFY extends enum('Contact','Individual','Household','Organization','Location','Address','Contribution','Activity','Relationship','Phonecall','Meeting','Group','Membership') NULL DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
- UPDATE civicrm_custom_group
- SET extends_entity_column_value=NULL
- WHERE extends='Activity';
-
- UPDATE civicrm_custom_group
- SET extends='Activity', extends_entity_column_value='2'
- WHERE extends='Phonecall';
-
- UPDATE civicrm_custom_group
- SET extends='Activity', extends_entity_column_value='1'
- WHERE extends='Meeting';
-
- UPDATE civicrm_custom_group
- SET extends_entity_column_value=NULL
- WHERE extends='Contact';
-
- UPDATE civicrm_custom_group
- SET extends_entity_column_value=NULL
- WHERE extends='Relationship';
-
--- /*******************************************************
--- *
--- * civicrm_custom_value
--- *
--- * Data store for each extended properties.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_custom_value ADD INDEX index_int_field (int_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_float_field (float_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_decimal_field (decimal_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_char_field (char_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_date_field (date_data, custom_field_id);
-
--- /*******************************************************
--- *
--- * civicrm_domain
--- *
--- * Top-level hierarchy to support multi-org/domain installations. Define domains for multi-org installs, else all contacts belong to one domain.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_domain ADD config_backend text COMMENT 'Backend configuration.';
- ALTER TABLE civicrm_domain ADD config_frontend text COMMENT 'Frontend configuration.';
-
--- /*******************************************************
--- *
--- * civicrm_entity_tag
--- *
--- * Tag entities (Contacts, Groups, Actions) to categories.
--- *
--- *******************************************************/
- ALTER TABLE `civicrm_entity_tag` ALTER COLUMN `entity_id` DROP DEFAULT;
- ALTER TABLE `civicrm_entity_tag` ALTER COLUMN `tag_id` DROP DEFAULT;
-
--- /*******************************************************
--- *
--- * civicrm_file
--- *
--- * Data store for uploaded (attached) files (pointer to file on disk OR blob). Maybe be joined to entities via custom_value.file_id or entity_file table.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_file` DROP FOREIGN KEY `civicrm_file_ibfk_1`;
- ALTER TABLE `civicrm_file` DROP INDEX `FKEY_file_type_id`;
-
--- /*******************************************************
--- *
--- * civicrm_group
--- *
--- * Provide grouping of related contacts
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_group ADD where_clause text NULL DEFAULT NULL AFTER visibility;
- ALTER TABLE civicrm_group ADD select_tables text NULL DEFAULT NULL AFTER where_clause;
- ALTER TABLE civicrm_group ADD where_tables text NULL DEFAULT NULL AFTER select_tables;
-
--- /*******************************************************
--- *
--- * civicrm_im
--- *
--- * IM information for a specific location.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_im` DROP FOREIGN KEY civicrm_im_ibfk_2;
- ALTER TABLE `civicrm_im` DROP INDEX FKEY_provider_id;
- ALTER TABLE `civicrm_im` ADD INDEX UI_provider_id (provider_id);
-
-
--- /*******************************************************
--- *
--- * civicrm_individual
--- *
--- * Define contact-individual specific properties. Extends civicrm_contact.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_individual DROP FOREIGN KEY civicrm_individual_ibfk_2;
- ALTER TABLE civicrm_individual DROP FOREIGN KEY civicrm_individual_ibfk_3;
- ALTER TABLE civicrm_individual DROP FOREIGN KEY civicrm_individual_ibfk_4;
-
- ALTER TABLE civicrm_individual DROP INDEX FKEY_prefix_id;
- ALTER TABLE civicrm_individual DROP INDEX FKEY_suffix_id;
- ALTER TABLE civicrm_individual DROP INDEX FKEY_gender_id;
-
- ALTER TABLE civicrm_individual ADD INDEX UI_prefix (prefix_id);
- ALTER TABLE civicrm_individual ADD INDEX UI_suffix (suffix_id);
- ALTER TABLE civicrm_individual ADD INDEX UI_gender (gender_id);
-
--- /*******************************************************
--- *
--- * civicrm_mapping
--- *
--- * Store field mappings in import or export for reuse
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_mapping` MODIFY mapping_type enum('Export','Import','Export Contributions','Import Contributions','Import Activity History','Search Builder','Import Memberships') COMMENT 'Type of Mapping.';
-
--- /*******************************************************
--- *
--- * civicrm_membership
--- *
--- * Contact Membership records.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_membership ADD reminder_date date AFTER is_override;
-
--- /*******************************************************
--- *
--- * civicrm_membership_log
--- *
--- * Logs actions which affect a Membership record (signup, status override, renewal, etc.)
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_membership_log ADD renewal_reminder_date date AFTER modified_date;
-
--- /*******************************************************
--- *
--- * civicrm_membership_type
--- *
--- * Sites can configure multiple types of memberships. They encode the owner organization, fee, and the rules needed to set start and end (expire) dates when a member signs up for that type.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_membership_type ADD renewal_msg_id int unsigned AFTER weight;
- ALTER TABLE civicrm_membership_type ADD renewal_reminder_day int AFTER renewal_msg_id;
-
- ALTER TABLE civicrm_membership_type ADD INDEX FKEY_renewal_msg_id ( renewal_msg_id );
- ALTER TABLE civicrm_membership_type ADD FOREIGN KEY (renewal_msg_id) REFERENCES civicrm_msg_template(id);
-
--- /*******************************************************
--- *
--- * civicrm_phone
--- *
--- * Phone information for a specific location.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_phone` DROP FOREIGN KEY civicrm_phone_ibfk_2;
- ALTER TABLE `civicrm_phone` DROP INDEX FKEY_mobile_provider_id;
-
- ALTER TABLE `civicrm_phone` ADD INDEX UI_mobile_provider_id (mobile_provider_id);
-
--- /*******************************************************
--- *
--- * civicrm_project
--- *
--- * Instantiate projects, programs, campaigns, etc.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_project DROP FOREIGN KEY civicrm_project_ibfk_2;
- ALTER TABLE civicrm_project DROP INDEX FKEY_status_id;
-
--- /*******************************************************
--- *
--- * civicrm_saved_search
--- *
--- * Users can save their complex SQL queries and use them later.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_saved_search` ADD where_clause text DEFAULT NULL COMMENT 'the sql where clause if a saved search acl';
-
- ALTER TABLE `civicrm_saved_search` ADD select_tables text DEFAULT NULL COMMENT 'the tables to be included in a select data';
-
- ALTER TABLE `civicrm_saved_search` ADD where_tables text DEFAULT NULL COMMENT 'the tables to be included in the count statement';
-
--- /*******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_task
--- *
--- * To-do items. Can be assigned to self or other entities.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_task` DROP FOREIGN KEY civicrm_task_ibfk_2;
- ALTER TABLE `civicrm_task` DROP FOREIGN KEY civicrm_task_ibfk_3;
-
- ALTER TABLE `civicrm_task` DROP INDEX FKEY_task_type_id;
- ALTER TABLE `civicrm_task` DROP INDEX FKEY_priority_id;
-
--- /*******************************************************
--- *
--- * civicrm_task_status
--- *
--- * Tracks the responsible entity, optional target entity and status of a task. Tasks can have multiple task_status entries if assigned to multiple responsible entities and-or there are multiple targets.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_task_status` DROP FOREIGN KEY civicrm_task_status_ibfk_2;
- ALTER TABLE `civicrm_task_status` DROP INDEX FKEY_status_id;
-
--- /*******************************************************
--- *
--- * civicrm_uf_group
--- *
--- * User framework groups. Each group represents a form which encompasses a set of fields defined in civicrm_uf_fields table. Initially will be used for CiviCRM Profile form(s). Subsequently we anticipate using this to define other public facing forms (e.g. online donation solicitation forms, mailing list preferences, etc.).
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD is_edit_link tinyint NULL DEFAULT '0' COMMENT 'Should edit link display in profile selector';
-
--- /*******************************************************
--- *
--- * Add UNIQUE indexes to maintain data integrity
--- *
--- *******************************************************/
-
- CREATE UNIQUE INDEX UI_contact_group ON civicrm_group_contact(contact_id,group_id);
- CREATE UNIQUE INDEX UI_contact ON civicrm_individual(contact_id);
- CREATE UNIQUE INDEX UI_contact ON civicrm_household(contact_id);
- CREATE UNIQUE INDEX UI_contact ON civicrm_organization(contact_id);
-
- CREATE UNIQUE INDEX UI_location ON civicrm_address(location_id);
-
- CREATE UNIQUE INDEX UI_contact ON civicrm_uf_match(contact_id);
- DROP INDEX UI_uf_id ON civicrm_uf_match;
- CREATE UNIQUE INDEX UI_uf_id ON civicrm_uf_match(uf_id);
- CREATE UNIQUE INDEX UI_contrib_trxn_id_domain_id ON civicrm_contribution_recur(trxn_id, domain_id);
- CREATE UNIQUE INDEX UI_contrib_invoice_id_domain_id ON civicrm_contribution_recur(invoice_id, domain_id);
-
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- All domain-keyed values handled by this included file
--- Handles all domain-keyed data. Included in civicrm_data.tpl for base initialization (@domain_id = 1).
--- *******************************************************/
-
- set @domain_id = 1;
-
--- /*******************************************************
--- *
--- * update the option group and option value
--- *
--- *******************************************************/
-
-INSERT INTO
- `civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
-VALUES
- (@domain_id, 'activity_type' , 'Activity Type' , 0, 1),
- (@domain_id, 'gender' , 'Gender' , 0, 1),
- (@domain_id, 'instant_messenger_service' , 'Instant Messenger (IM) screen-names', 0, 1),
- (@domain_id, 'mobile_provider' , 'Mobile Phone Providers' , 0, 1),
- (@domain_id, 'individual_prefix' , 'Individual contact prefixes.' , 0, 1),
- (@domain_id, 'individual_suffix' , 'Individual contact suffixes.' , 0, 1),
- (@domain_id, 'acl_role' , 'ACL Role.' , 0, 1),
- (@domain_id, 'accept_creditcard' , 'Accept Credit Card' , 0, 1),
- (@domain_id, 'payment_instrument' , 'Payment Instrument' , 0, 1),
- (@domain_id, 'contribution_status' , 'Contribution Status' , 0, 1);
-
-SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
-SELECT @option_group_id_gender := max(id) from civicrm_option_group where name = 'gender';
-SELECT @option_group_id_IMProvider := max(id) from civicrm_option_group where name = 'instant_messenger_service';
-SELECT @option_group_id_mobileProvider := max(id) from civicrm_option_group where name = 'mobile_provider';
-SELECT @option_group_id_prefix := max(id) from civicrm_option_group where name = 'individual_prefix';
-SELECT @option_group_id_suffix := max(id) from civicrm_option_group where name = 'individual_suffix';
-SELECT @option_group_id_aclRole := max(id) from civicrm_option_group where name = 'acl_role';
-SELECT @option_group_id_acc := max(id) from civicrm_option_group where name = 'accept_creditcard';
-SELECT @option_group_id_pi := max(id) from civicrm_option_group where name = 'payment_instrument';
-SELECT @option_group_id_cs := max(id) from civicrm_option_group where name = 'contribution_status';
-
-INSERT INTO
- `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
-VALUES
- (@option_group_id_act, 'Meeting', 1, 'Meeting',NULL, 0, NULL, 1, 'Schedule a meeting', 0, 0, 1),
- (@option_group_id_act, 'Phone Call', 2, 'Phone Call', NULL, 0, NULL, 2, 'Schedule a Phone Call', 0, 0, 1),
- (@option_group_id_act, 'Email', 3, 'Email', NULL, 0, NULL, 3, 'Email Sent', 0, 0, 1),
- (@option_group_id_act, 'SMS', 4, 'SMS', NULL, 0, NULL, 4, 'SMS', 0, 0, 1),
- (@option_group_id_act, 'Event', 5,'Event', NULL, 0, NULL, 5, 'Event', 0, 0, 1),
-
- (@option_group_id_gender, 'Female', 1, 'Female', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_gender, 'Male', 2, 'Male', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_gender, 'Transgender', 3, 'Transgender', NULL, 0, NULL, 3, NULL, 0, 0, 1),
-
- (@option_group_id_IMProvider, 'Yahoo', 1, 'Yahoo', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'MSN', 2, 'Msn', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'AIM', 3, 'Aim', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'GTalk', 4, 'Gtalk', NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'Jabber',5, 'Jabber',NULL, 0, NULL, 5, NULL, 0, 0, 1),
- (@option_group_id_IMProvider, 'Skype', 6, 'Skype', NULL, 0, NULL, 6, NULL, 0, 0, 1),
-
- (@option_group_id_mobileProvider, 'Sprint' , 1, 'Sprint' , NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_mobileProvider, 'Verizon' , 2, 'Verizon' , NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_mobileProvider, 'Cingular', 3, 'Cingular', NULL, 0, NULL, 3, NULL, 0, 0, 1),
-
- (@option_group_id_prefix, 'Mrs', 1, 'Mrs', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_prefix, 'Ms', 2, 'Ms', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_prefix, 'Mr', 3, 'Mr', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_prefix, 'Dr', 4, 'Dr', NULL, 0, NULL, 4, NULL, 0, 0, 1),
-
- (@option_group_id_suffix, 'Jr', 1, 'Jr', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'Sr', 2, 'Sr', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'II', 3, 'II', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'III', 4, 'III', NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'IV', 5, 'IV', NULL, 0, NULL, 5, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'V', 6, 'V', NULL, 0, NULL, 6, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'VI', 7, 'VI', NULL, 0, NULL, 7, NULL, 0, 0, 1),
- (@option_group_id_suffix, 'VII', 8, 'VII', NULL, 0, NULL, 8, NULL, 0, 0, 1),
-
- (@option_group_id_aclRole, 'Administrator', 1, 'Admin', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_aclRole, 'Authenticated', 2, 'Auth' , NULL, 0, NULL, 2, NULL, 0, 0, 1),
-
- (@option_group_id_acc, 'Visa', 1, 'Visa', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_acc, 'MasterCard', 2, 'MasterCard', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_acc, 'American Express', 3, 'American Express', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_acc, 'Discover', 4, 'Discover', NULL, 0, NULL, 4, NULL, 0, 0, 1),
-
- (@option_group_id_pi, 'Credit Card', 1, 'Credit Card', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_pi, 'Debit Card', 2, 'Debit Card', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_pi, 'Cash', 3, 'Cash', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_pi, 'Check', 4, 'Check', NULL, 0, NULL, 4, NULL, 0, 0, 1),
- (@option_group_id_pi, 'EFT', 5, 'EFT', NULL, 0, NULL, 5, NULL, 0, 0, 1),
-
- (@option_group_id_cs, 'Completed', 1, 'Completed', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_cs, 'Pending' , 2, 'Pending' , NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_cs, 'Cancelled', 3, 'Cancelled', NULL, 0, NULL, 3, NULL, 0, 0, 1);
-
--- /*******************************************************
--- *
--- * add the Netherlands state of Limburg (CRM-1228)
--- *
--- *******************************************************/
-
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (5176, 1152, "LI", "Limburg");
-
--- /*******************************************************
--- *
--- * update the province list (CRM-1271)
--- *
--- *******************************************************/
-
- UPDATE civicrm_state_province SET name="Co Antrim" WHERE id=2595;
- UPDATE civicrm_state_province SET name="Co Armagh" WHERE id=2598;
- UPDATE civicrm_state_province SET name="Bristol" WHERE id=2620;
- UPDATE civicrm_state_province SET name="Co Down" WHERE id=2652;
- UPDATE civicrm_state_province SET name="Co Durham" WHERE id=2657;
- UPDATE civicrm_state_province SET name="Co Fermanagh" WHERE id=2670;
- UPDATE civicrm_state_province SET name="Glasgow" WHERE id=2674;
- UPDATE civicrm_state_province SET name="Herefordshire" WHERE id=2687;
- UPDATE civicrm_state_province SET name="Kingston upon Hull" WHERE id=2700;
- UPDATE civicrm_state_province SET name="North Ayrshire" WHERE id=2735;
- UPDATE civicrm_state_province SET name="Cleveland" WHERE id=2760;
- UPDATE civicrm_state_province SET name="Rhondda Cynon Taff" WHERE id=2762;
- UPDATE civicrm_state_province SET name="Scottish Borders" WHERE id=2770;
- UPDATE civicrm_state_province SET name="Vale of Glamorgan" WHERE id=2804;
-
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9000, 1196, "NW", "North West" );
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9986, 1226, "xTYW", "Tyne and Wear");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9987, 1226, "xIOM", "Isle of Man");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9988, 1226, "xGMA", "Greater Manchester");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9989, 1226, "xTYR", "Co Tyrone");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9990, 1226, "xWYO", "West Yorkshire");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9991, 1226, "xSYO", "South Yorkshire");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9992, 1226, "xMSD", "Merseyside");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9993, 1226, "xBRK", "Berkshire");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9994, 1226, "xWMD", "West Midlands");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9995, 1226, "xIVN", "Inverness");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9996, 1226, "xAVN", "Avon");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9997, 1226, "xMDX", "Middlesex");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9998, 1226, "xWGM", "West Glamorgan");
- INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (9999, 1226, "xLON", "London");
-
--- /*******************************************************
--- *
--- * update database (CRM-1275)
--- *
--- *******************************************************/
-
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-
--- /*******************************************************
--- *
--- * Clean up the exisiting tables
--- *
--- *******************************************************/
-
-DROP TABLE IF EXISTS civicrm_accept_credit_card;
-DROP TABLE IF EXISTS civicrm_activity_type;
-DROP TABLE IF EXISTS civicrm_acl_group;
-DROP TABLE IF EXISTS civicrm_gender;
-DROP TABLE IF EXISTS civicrm_individual_prefix;
-DROP TABLE IF EXISTS civicrm_individual_suffix;
-DROP TABLE IF EXISTS civicrm_im_provider;
-DROP TABLE IF EXISTS civicrm_mobile_provider;
-DROP TABLE IF EXISTS civicrm_payment_instrument;
-DROP TABLE IF EXISTS civicrm_acl_group_join;
-
--- /*******************************************************
--- *
--- * civicrm_acl_cache
--- *
--- * Cache for acls and contacts
--- *
--- *******************************************************/
-CREATE TABLE civicrm_acl_cache (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique table ID',
- contact_id int unsigned COMMENT 'Foreign Key to Contact',
- acl_id int unsigned NOT NULL COMMENT 'Foreign Key to ACL',
- modified_date date COMMENT 'When was this cache entry last modified'
-,
- PRIMARY KEY ( id )
-,
- INDEX index_acl_id( acl_id),
- INDEX contact_id (contact_id)
-,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-,
- FOREIGN KEY (acl_id) REFERENCES civicrm_acl(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_acl_entity_role
--- *
--- * Join table for Contacts and Groups to ACL Roles
--- *
--- *******************************************************/
-CREATE TABLE civicrm_acl_entity_role (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique table ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- acl_role_id int unsigned NOT NULL COMMENT 'Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)',
- entity_table varchar(64) NOT NULL COMMENT 'Table of the object joined to the ACL Role (Contact or Group)',
- entity_id int unsigned NOT NULL COMMENT 'ID of the group/contact object being joined',
- is_active tinyint COMMENT 'Is this property active?'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_role(
- acl_role_id
- )
- , INDEX index_entity(
- entity_table
- , entity_id
- )
- , INDEX domain_id (
- domain_id
- )
- ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_msg_template
--- *
--- * Users will need a way to save and retrieve templates with tokens for use in recurring email communication tasks
--- *
--- *******************************************************/
-CREATE TABLE civicrm_msg_template (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Message Template ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- msg_title varchar(255) COMMENT 'Descriptive title of message',
- msg_subject varchar(255) COMMENT 'Subject for email message.',
- msg_text text COMMENT 'Text formatted message',
- msg_html text COMMENT 'HTML formatted message',
- is_active tinyint DEFAULT 1
-,
- PRIMARY KEY ( id )
-
-
-,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * Modify the civicrm_acl Table Structure
--- *******************************************************/
-
- ALTER TABLE `civicrm_acl` ADD domain_id int(10) unsigned NOT NULL COMMENT 'Which Domain owns this contact';
- ALTER TABLE `civicrm_acl` ADD FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain`(`id`);
- ALTER TABLE `civicrm_acl` ADD INDEX `domain_id` (`domain_id`);
-
- ALTER TABLE `civicrm_acl` ADD name varchar(64) COMMENT 'ACL Name.';
-
- ALTER TABLE `civicrm_acl` CHANGE `operation` `operation` ENUM('All', 'View', 'Edit', 'Create', 'Delete', 'Grant', 'Revoke') NOT NULL COMMENT 'What operation does this ACL entry control?';
- ALTER TABLE `civicrm_acl` ADD is_active tinyint(4) COMMENT 'Is this property active?' AFTER acl_id;
-
- ALTER TABLE `civicrm_acl` ADD INDEX index_acl_id (acl_id);
-
--- /*******************************************************
--- *
--- * civicrm_activity
--- *
--- * Join table for activities
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_activity` DROP FOREIGN KEY civicrm_activity_ibfk_2;
- ALTER TABLE `civicrm_activity` ADD INDEX UI_activity_type_id (`activity_type_id`);
-
--- /*******************************************************
--- *
--- * civicrm_activity_history
--- *
--- * Record history for an entity in the crm module
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_activity_history ADD INDEX index_activity (activity_id);
-
--- /*******************************************************
--- *
--- * civicrm_contact
--- *
--- * Three types of contacts are defined: Individual, Organization and Household. Contact objects are defined by a civicrm_contact record plus a related civicrm_contact_type record.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_contact ADD INDEX index_contact_type_domain (contact_type, domain_id);
- ALTER TABLE civicrm_contact ADD INDEX index_contact_sub_type_domain (contact_sub_type, domain_id);
-
- ALTER TABLE civicrm_contact ADD INDEX index_preferred_communication_method (preferred_communication_method);
-
- UPDATE civicrm_contact
- SET `preferred_communication_method` = CONCAT(char(1),`preferred_communication_method`,char(1))
- WHERE civicrm_contact.preferred_communication_method IS NOT NULL;
-
--- /*******************************************************
--- *
--- * civicrm_contribution
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution` DROP FOREIGN KEY `civicrm_contribution_ibfk_6`;
- ALTER TABLE `civicrm_contribution` DROP FOREIGN KEY `civicrm_contribution_ibfk_7`;
-
- ALTER TABLE `civicrm_contribution` DROP `recur_contribution_id`;
-
- ALTER TABLE `civicrm_contribution` ADD `honor_contact_id` int unsigned COMMENT 'FK to contact ID';
- ALTER TABLE `civicrm_contribution` ADD FOREIGN KEY (`honor_contact_id`) REFERENCES `civicrm_contact` (`id`);
-
- ALTER TABLE `civicrm_contribution` ADD contribution_recur_id int unsigned COMMENT 'Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.' AFTER note;
- ALTER TABLE `civicrm_contribution` ADD FOREIGN KEY (`contribution_recur_id`) REFERENCES civicrm_contribution_recur(`id`);
-
- ALTER TABLE `civicrm_contribution` ADD is_test tinyint DEFAULT 0;
- ALTER TABLE `civicrm_contribution` ADD `contribution_status_id` int unsigned NULL DEFAULT '1';
- ALTER TABLE `civicrm_contribution` ADD INDEX honor_contact_id (`honor_contact_id`);
- ALTER TABLE `civicrm_contribution` ADD INDEX UI_contrib_payment_instrument_id (payment_instrument_id);
- ALTER TABLE `civicrm_contribution` ADD INDEX index_contribution_status (contribution_status_id);
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- * A Contribution object store meta information about a single customized contribution page
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution_page` ADD honor_block_is_active tinyint COMMENT 'Should this contribution have the honor block enabled?';
- ALTER TABLE `civicrm_contribution_page` ADD honor_block_title varchar(255) COMMENT 'Title for honor block.';
- ALTER TABLE `civicrm_contribution_page` ADD honor_block_text text COMMENT 'text for honor block.';
- ALTER TABLE `civicrm_contribution_page` ADD is_monetary tinyint NULL DEFAULT '1' COMMENT 'if true - allows real-time monetary transactions otherwise non-monetary transactions';
- ALTER TABLE `civicrm_contribution_page` ADD is_recur tinyint NULL DEFAULT '0' COMMENT 'if true - allows recurring contributions, valid only for PayPal_Standard' AFTER is_monetary;
-
--- /*******************************************************
--- *
--- * civicrm_contribution_recur
--- *
--- *******************************************************/
- ALTER TABLE civicrm_contribution_recur DROP is_active;
-
- ALTER TABLE civicrm_contribution_recur ADD domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contribution class.' AFTER id;
- ALTER TABLE civicrm_contribution_recur ADD trxn_id varchar(255) COMMENT 'unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method';
- ALTER TABLE civicrm_contribution_recur ADD invoice_id varchar(255) COMMENT 'unique invoice id, system generated or passed in' AFTER trxn_id;
- ALTER TABLE civicrm_contribution_recur ADD contribution_status_id int unsigned NULL DEFAULT '1' AFTER invoice_id;
- ALTER TABLE civicrm_contribution_recur ADD end_date datetime NOT NULL COMMENT 'Date this recurring contribution finished successfully' AFTER cancel_date;
- ALTER TABLE civicrm_contribution_recur ADD is_test tinyint NULL DEFAULT '0'AFTER contribution_status_id ;
-
- ALTER TABLE civicrm_contribution_recur MODIFY start_date datetime NOT NULL COMMENT 'The date the first scheduled recurring contribution occurs.';
- ALTER TABLE civicrm_contribution_recur MODIFY create_date datetime NOT NULL COMMENT 'When this recurring contribution record was created.';
- ALTER TABLE civicrm_contribution_recur MODIFY modified_date datetime NOT NULL COMMENT 'Last updated date for this record. mostly the last time a payment was received';
- ALTER TABLE civicrm_contribution_recur MODIFY cancel_date datetime NOT NULL COMMENT 'Date this recurring contribution was cancelled by contributor- if we can get access to it';
- ALTER TABLE civicrm_contribution_recur MODIFY next_sched_contribution datetime NOT NULL COMMENT 'At Groundspring this was used by the cron job which triggered payments. If we\'re not doing that but we know about payments, it might still be useful to store for display to org andor contributors.';
- ALTER TABLE civicrm_contribution_recur MODIFY failure_retry_date datetime COMMENT 'At Groundspring we set a business rule to retry failed payments every 7 days - and stored the next scheduled attempt date there.';
-
- ALTER TABLE civicrm_contribution_recur ADD INDEX index_contribution_status( contribution_status_id );
-
- ALTER TABLE civicrm_contribution_recur ADD FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id);
-
--- /*******************************************************
--- *
--- * civicrm_custom_group
--- *
--- * All extended (custom) properties are associated with a group. These are logical sets of related data.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` ADD extends_entity_column_name varchar(64) COMMENT 'linking custom group for dynamic object';
- ALTER TABLE `civicrm_custom_group` ADD extends_entity_column_value varchar(64) COMMENT 'linking custom group for dynamic object';
- ALTER TABLE `civicrm_custom_group` MODIFY extends enum('Contact','Individual','Household','Organization','Location','Address','Contribution','Activity','Relationship','Phonecall','Meeting','Group','Membership') NULL DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
- UPDATE civicrm_custom_group
- SET extends_entity_column_value=NULL
- WHERE extends='Activity';
-
- UPDATE civicrm_custom_group
- SET extends='Activity', extends_entity_column_value='2'
- WHERE extends='Phonecall';
-
- UPDATE civicrm_custom_group
- SET extends='Activity', extends_entity_column_value='1'
- WHERE extends='Meeting';
-
- UPDATE civicrm_custom_group
- SET extends_entity_column_value=NULL
- WHERE extends='Contact';
-
- UPDATE civicrm_custom_group
- SET extends_entity_column_value=NULL
- WHERE extends='Relationship';
-
--- /*******************************************************
--- *
--- * civicrm_custom_value
--- *
--- * Data store for each extended properties.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_custom_value ADD INDEX index_int_field (int_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_float_field (float_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_decimal_field (decimal_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_char_field (char_data, custom_field_id);
- ALTER TABLE civicrm_custom_value ADD INDEX index_date_field (date_data, custom_field_id);
-
--- /*******************************************************
--- *
--- * civicrm_domain
--- *
--- * Top-level hierarchy to support multi-org/domain installations. Define domains for multi-org installs, else all contacts belong to one domain.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_domain ADD config_backend text COMMENT 'Backend configuration.';
- ALTER TABLE civicrm_domain ADD config_frontend text COMMENT 'Frontend configuration.';
-
--- /*******************************************************
--- *
--- * civicrm_entity_tag
--- *
--- * Tag entities (Contacts, Groups, Actions) to categories.
--- *
--- *******************************************************/
- ALTER TABLE `civicrm_entity_tag` ALTER COLUMN `entity_id` DROP DEFAULT;
- ALTER TABLE `civicrm_entity_tag` ALTER COLUMN `tag_id` DROP DEFAULT;
-
--- /*******************************************************
--- *
--- * civicrm_file
--- *
--- * Data store for uploaded (attached) files (pointer to file on disk OR blob). Maybe be joined to entities via custom_value.file_id or entity_file table.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_file` DROP FOREIGN KEY `civicrm_file_ibfk_1`;
- ALTER TABLE `civicrm_file` DROP `file_type_id`;
- ALTER TABLE `civicrm_file` ADD file_type_id int unsigned COMMENT 'Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.';
-
--- /*******************************************************
--- *
--- * civicrm_group
--- *
--- * Provide grouping of related contacts
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_group ADD where_clause text COMMENT 'the sql where clause if a saved search acl';
- ALTER TABLE civicrm_group ADD select_tables text COMMENT 'the tables to be included in a select data';
- ALTER TABLE civicrm_group ADD where_tables text COMMENT 'the tables to be included in the count statement';
-
--- /*******************************************************
--- *
--- * civicrm_group_contact
--- *
--- * Join table sets membership for 'static' groups. Also used to store 'opt-out' entries for 'query' type groups (status = 'OUT')
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_group_contact DROP FOREIGN KEY civicrm_group_contact_ibfk_2;
-
--- /*******************************************************
--- *
--- * civicrm_household
--- *
--- * Define household specific properties
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_household DROP FOREIGN KEY civicrm_household_ibfk_1;
-
--- /*******************************************************
--- *
--- * civicrm_im
--- *
--- * IM information for a specific location.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_im DROP FOREIGN KEY civicrm_im_ibfk_2;
- ALTER TABLE civicrm_im ADD INDEX UI_provider_id (provider_id);
-
--- /*******************************************************
--- *
--- * civicrm_individual
--- *
--- * Define contact-individual specific properties. Extends civicrm_contact.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_individual DROP FOREIGN KEY civicrm_individual_ibfk_1;
- ALTER TABLE civicrm_individual DROP FOREIGN KEY civicrm_individual_ibfk_2;
- ALTER TABLE civicrm_individual DROP FOREIGN KEY civicrm_individual_ibfk_3;
- ALTER TABLE civicrm_individual DROP FOREIGN KEY civicrm_individual_ibfk_4;
- ALTER TABLE civicrm_individual ADD INDEX UI_prefix (prefix_id);
- ALTER TABLE civicrm_individual ADD INDEX UI_suffix (suffix_id);
- ALTER TABLE civicrm_individual ADD INDEX UI_gender (gender_id);
-
--- /*******************************************************
--- *
--- * civicrm_mapping
--- *
--- * Store field mappings in import or export for reuse
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_mapping` MODIFY mapping_type enum('Export','Import','Export Contributions','Import Contributions','Import Activity History','Search Builder','Import Memberships') COMMENT 'Type of Mapping.';
-
--- /*******************************************************
--- *
--- * civicrm_membership
--- *
--- * Contact Membership records.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_membership` ADD reminder_date date COMMENT 'When should a reminder be sent.' AFTER is_override;
-
--- /*******************************************************
--- *
--- * civicrm_membership_log
--- *
--- * Logs actions which affect a Membership record (signup, status override, renewal, etc.)
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_membership_log ADD renewal_reminder_date date COMMENT 'The day we sent a renewal reminder' AFTER modified_date;
-
--- /*******************************************************
--- *
--- * civicrm_membership_type
--- *
--- * Sites can configure multiple types of memberships. They encode the owner organization, fee, and the rules needed to set start and end (expire) dates when a member signs up for that type.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_membership_type ADD renewal_msg_id int unsigned COMMENT 'FK to civicrm_msg_template.id' AFTER weight;
- ALTER TABLE civicrm_membership_type ADD renewal_reminder_day int COMMENT 'Number of days prior to expiration to send renewal reminder' AFTER renewal_msg_id;
-
- ALTER TABLE civicrm_membership_type ADD FOREIGN KEY (renewal_msg_id) REFERENCES civicrm_msg_template(id);
-
--- /*******************************************************
--- *
--- * civicrm_organization
--- *
--- * Define organization specific properties
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_organization DROP FOREIGN KEY civicrm_organization_ibfk_1;
-
--- /*******************************************************
--- *
--- * civicrm_phone
--- *
--- * Phone information for a specific location.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_phone` DROP FOREIGN KEY civicrm_phone_ibfk_2;
-
- ALTER TABLE `civicrm_phone` ADD INDEX UI_mobile_provider_id (mobile_provider_id);
-
--- /*******************************************************
--- *
--- * civicrm_project
--- *
--- * Instantiate projects, programs, campaigns, etc.
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_project DROP FOREIGN KEY civicrm_project_ibfk_2;
- ALTER TABLE civicrm_project DROP `status_id`;
- ALTER TABLE civicrm_project ADD status_id int unsigned COMMENT 'Configurable status value (e.g. Planned, Active, Closed...). FK to civicrm_option_value.';
-
--- /*******************************************************
--- *
--- * civicrm_saved_search
--- *
--- * Users can save their complex SQL queries and use them later.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_saved_search` ADD where_clause text DEFAULT NULL COMMENT 'the sql where clause if a saved search acl';
-
- ALTER TABLE `civicrm_saved_search` ADD select_tables text DEFAULT NULL COMMENT 'the tables to be included in a select data';
-
- ALTER TABLE `civicrm_saved_search` ADD where_tables text DEFAULT NULL COMMENT 'the tables to be included in the count statement';
-
--- /*******************************************************
--- *
--- * civicrm_task
--- *
--- * To-do items. Can be assigned to self or other entities.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_task` DROP FOREIGN KEY civicrm_task_ibfk_2;
- ALTER TABLE `civicrm_task` DROP `task_type_id`;
- ALTER TABLE `civicrm_task` ADD task_type_id int unsigned COMMENT 'Configurable task type values (e.g. App Submit, App Review...). FK to civicrm_option_value.';
-
- ALTER TABLE `civicrm_task` DROP FOREIGN KEY civicrm_task_ibfk_3;
- ALTER TABLE `civicrm_task` DROP `priority_id`;
- ALTER TABLE `civicrm_task` ADD priority_id int unsigned COMMENT 'Configurable priority value (e.g. Critical, High, Medium...). FK to civicrm_option_value.';
-
--- /*******************************************************
--- *
--- * civicrm_task_status
--- *
--- * Tracks the responsible entity, optional target entity and status of a task. Tasks can have multiple task_status entries if assigned to multiple responsible entities and-or there are multiple targets.
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_task_status` DROP FOREIGN KEY civicrm_task_status_ibfk_2;
- ALTER TABLE `civicrm_task_status` DROP `status_id`;
- ALTER TABLE `civicrm_task_status` ADD status_id int unsigned COMMENT 'Configurable status value (e.g. Not Started, In Progress, Completed, Deferred...). FK to civicrm_option_value.';
-
--- /*******************************************************
--- *
--- * civicrm_uf_group
--- *
--- * User framework groups. Each group represents a form which encompasses a set of fields defined in civicrm_uf_fields table. Initially will be used for CiviCRM Profile form(s). Subsequently we anticipate using this to define other public facing forms (e.g. online donation solicitation forms, mailing list preferences, etc.).
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD is_edit_link tinyint NULL DEFAULT '0' COMMENT 'Should edit link display in profile selector';
-
--- /*******************************************************
--- *
--- * Add UNIQUE indexes to maintain data integrity
--- *
--- *******************************************************/
-
- CREATE UNIQUE INDEX UI_contact_group ON civicrm_group_contact(contact_id,group_id);
- CREATE UNIQUE INDEX UI_contact ON civicrm_individual(contact_id);
- CREATE UNIQUE INDEX UI_contact ON civicrm_household(contact_id);
- CREATE UNIQUE INDEX UI_contact ON civicrm_organization(contact_id);
- CREATE UNIQUE INDEX UI_location ON civicrm_address(location_id);
- CREATE UNIQUE INDEX UI_contact ON civicrm_uf_match(contact_id);
- DROP INDEX UI_uf_id ON civicrm_uf_match;
- CREATE UNIQUE INDEX UI_uf_id ON civicrm_uf_match(uf_id);
- CREATE UNIQUE INDEX UI_contrib_trxn_id_domain_id ON civicrm_contribution_recur(trxn_id,domain_id);
- CREATE UNIQUE INDEX UI_contrib_invoice_id_domain_id ON civicrm_contribution_recur(invoice_id,domain_id);
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * adding of new tables
--- *
--- *******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_event
--- *
--- *******************************************************/
-CREATE TABLE civicrm_event (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event',
- domain_id int unsigned NOT NULL DEFAULT 0 COMMENT 'Event belongs to which Domain?',
- title varchar(255) COMMENT 'Event Title (e.g. Fall Fundraiser Dinner)',
- summary text COMMENT 'Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.',
- description text COMMENT 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
- event_type_id int unsigned DEFAULT 0 COMMENT 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
- is_public tinyint DEFAULT 1 COMMENT 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
- start_date datetime COMMENT 'Date and time that event starts.',
- end_date datetime COMMENT 'Date and time that event ends. May be NULL if no defined end date/time',
- is_online_registration tinyint DEFAULT 0 COMMENT 'If true, include registration link on Event Info page.',
- registration_link_text varchar(255) COMMENT 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
- max_participants int unsigned DEFAULT 0 COMMENT 'Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.',
- event_full_text text COMMENT 'Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.',
- is_monetary tinyint DEFAULT 1 COMMENT 'Is this a PAID event? If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
- contribution_type_id int unsigned DEFAULT 0 COMMENT 'Contribution type assigned to paid event registrations for this event. Required if is_monetary is true.',
- is_map tinyint DEFAULT 0 COMMENT 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
- is_active tinyint DEFAULT 0 COMMENT 'Is this Event enabled or disabled/cancelled?'
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_domain_id ( domain_id ) ,
- FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) TYPE=InnoDB ;
-
-
--- /*******************************************************
--- *
--- * civicrm_event_page
--- *
--- *******************************************************/
-CREATE TABLE civicrm_event_page (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event Page ID',
- event_id int unsigned NOT NULL COMMENT 'Event which this page belongs to.',
- intro_text text COMMENT 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
- footer_text text COMMENT 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
- confirm_title varchar(255) DEFAULT NULL COMMENT 'Title for Confirmation page.',
- confirm_text text COMMENT 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
- confirm_footer_text text COMMENT 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
- is_email_confirm tinyint DEFAULT 1 COMMENT 'If true, confirmation is automatically emailed to contact on successful registration.',
- confirm_email_text text COMMENT 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
- confirm_from_name varchar(255) COMMENT 'FROM email name used for confirmation emails.',
- confirm_from_email varchar(255) COMMENT 'FROM email address used for confirmation emails.',
- cc_confirm varchar(255) COMMENT 'comma-separated list of email addresses to cc each time a confirmation is sent',
- bcc_confirm varchar(255) COMMENT 'comma-separated list of email addresses to bcc each time a confirmation is sent',
- default_fee_id int unsigned NOT NULL COMMENT 'FK to civicrm_custom_option.',
- thankyou_title varchar(255) DEFAULT NULL COMMENT 'Title for ThankYou page.',
- thankyou_text text COMMENT 'ThankYou Text.',
- thankyou_footer_text text COMMENT 'Footer message.'
-,
- PRIMARY KEY ( id )
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_participant
--- *
--- *******************************************************/
-CREATE TABLE civicrm_participant (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Participant Id',
- contact_id int unsigned DEFAULT 0 COMMENT 'FK to Contact ID',
- event_id int unsigned DEFAULT 0 COMMENT 'FK to Event ID',
- status_id int unsigned DEFAULT 1 COMMENT 'Participant status ID. Implicit FK to civicrm_option_value where option_group = participant_status. Default of 1 should map to status = Registered.',
- role_id int unsigned DEFAULT NULL COMMENT 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
- register_date datetime COMMENT 'When did contact register for event?',
- source varchar(128) COMMENT 'Source of this event registration.',
- event_level varchar(255) COMMENT 'Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that we store the label value rather than an FK as the label stored in custom_option may change, but we dont want that to change the label in place at time of this registration.',
- is_test tinyint DEFAULT 0
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_contact_id ( contact_id ) ,
- FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-, INDEX FKEY_event_id ( event_id ) ,
- FOREIGN KEY (event_id) REFERENCES civicrm_event(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_participant_payment
--- *
--- *******************************************************/
-CREATE TABLE civicrm_participant_payment (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Participant Payment Id',
- participant_id int unsigned NOT NULL COMMENT 'Participant Id (FK)',
- payment_entity_table varchar(128) COMMENT 'Table being referenced for payment entity (expected usage is civicrm_contribution).',
- payment_entity_id int unsigned NOT NULL COMMENT 'FK to table with payment record (e.g. civicrm_contribution.id).'
-,
- PRIMARY KEY ( id )
-
-, INDEX FKEY_participant_id ( participant_id ) ,
- FOREIGN KEY (participant_id) REFERENCES civicrm_participant(id)
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * civicrm_currency
--- *
--- *******************************************************/
-CREATE TABLE civicrm_currency (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Currency Id',
- name varchar(64) COMMENT 'Currency Name',
- symbol varchar(8) COMMENT 'Currency Symbol'
-,
- PRIMARY KEY ( id )
-
-) TYPE=InnoDB ;
-
--- /*******************************************************
--- *
--- * Insert sample data to civicrm_currency
--- *
--- *******************************************************/
-
- INSERT INTO `civicrm_currency` VALUES (1,'AUD','$'),(2,'CAD','$'),(3,'EUR','€'),(4,'GBP','£'),(5,'ILS','₪'),(6,'INR','₨'),(7,'JPY','¥'),(8,'KRW','₩'),(9,'LAK','₭'),(10,'MNT','₮'),(11,'NGN','₦'),(12,'PLN','zł'),(13,'THB','฿'),(14,'USD','$'),(15,'VND','₫'),(16,'ZAR','R');
-
--- /*******************************************************
--- *
--- * civicrm_address
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_address`
- MODIFY `geo_code_1` double NULL DEFAULT NULL COMMENT 'Latitude or UTM (Universal Transverse Mercator Grid) Northing.',
- MODIFY `geo_code_2` double NULL DEFAULT NULL COMMENT 'Longitude or UTM (Universal Transverse Mercator Grid) Easting.';
-
--- /*******************************************************
--- *
--- * civicrm_contact
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contact` ADD INDEX `UI_external_identifier` (`external_identifier`);
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- *******************************************************/
- ALTER TABLE `civicrm_contribution_page` ADD `default_amount_id` int unsigned NOT NULL COMMENT 'FK to civicrm_custom_option.';
- ALTER TABLE `civicrm_contribution_page` DROP `default_amount`;
-
--- /*******************************************************
--- *
--- * civicrm_custom_group
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` MODIFY extends enum('Contact','Individual','Household','Organization','Location','Address','Contribution','Activity','Relationship','Phonecall','Meeting','Group','Membership','Participant','Event') NULL DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
--- /*******************************************************
--- *
--- * civicrm_custom_value
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_value` MODIFY float_data double NULL DEFAULT NULL COMMENT 'stores data for ext property data_type = float.';
-
--- /*******************************************************
--- *
--- * civicrm_location_type
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_location_type` MODIFY vcard_name varchar(64) NULL DEFAULT NULL COMMENT 'vCard Location Type Name.';
-
--- /*******************************************************
--- *
--- * civicrm_mapping
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_mapping MODIFY mapping_type enum('Export','Import','Export Contributions','Import Contributions','Import Activity History','Search Builder','Import Memberships','Import Participants') NULL DEFAULT NULL COMMENT 'Type of Mapping.';
-
--- /*******************************************************
--- *
--- * civicrm_mapping_field
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_mapping_field ADD `relationship_direction` varchar(6) NULL DEFAULT NULL COMMENT '';
- UPDATE `civicrm_mapping_field` set `relationship_direction` = 'a_b';
-
--- /*******************************************************
--- *
--- * civicrm_membership_type
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_membership_type` ADD `relationship_direction` varchar(6) NULL DEFAULT NULL COMMENT '';
- UPDATE `civicrm_membership_type` set `relationship_direction` = 'a_b';
-
--- /*******************************************************
--- *
--- * civicrm_note
--- *
--- *******************************************************/
- INSERT INTO `civicrm_note`
- (`entity_table`, `contact_id`, `entity_id`, `note`)
- SELECT 'civicrm_contribution', `contact_id`, `civicrm_contribution`.`id`, `civicrm_contribution`.`note`
- FROM civicrm_contribution;
-
--- /*******************************************************
--- *
--- * civicrm_contribution
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution` ADD INDEX `received_date` (`receive_date`);
- ALTER TABLE `civicrm_contribution` ADD `amount_level` varchar(255) NULL DEFAULT NULL COMMENT '' AFTER source;
- ALTER TABLE `civicrm_contribution` DROP `note`;
-
--- /*******************************************************
--- *
--- * civicrm_uf_group
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD is_uf_link tinyint(4) NULL DEFAULT '0' COMMENT 'Should we display a link to the website profile in profile selector' AFTER is_edit_link;
- ALTER TABLE `civicrm_uf_group` ADD is_update_dupe tinyint(4) NULL DEFAULT '0' COMMENT 'Should we update the contact record if we find a duplicate' AFTER is_uf_link;
-
--- /*******************************************************
--- *
--- * civicrm_uf_match
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_match` DROP INDEX UI_uf_id;
- ALTER TABLE `civicrm_uf_match` ADD UNIQUE UI_uf_domain_id (uf_id, domain_id);
-
--- /*******************************************************
--- *
--- * CRM-1570 - migrate the old, CiviCRM 1.4 callbacks
--- * (we don't support localized CiviCRM in MySQL 4.0,
--- * so no localized acitivity names update here)
--- *
--- *******************************************************/
-
- UPDATE civicrm_activity_history SET callback = 'CRM_Activity_BAO_Activity::showActivityDetails' WHERE callback IN ('CRM_Activity_Form_Meeting::showMeetingDetails', 'CRM_Activity_Form_OtherActivity::showOtherActivityDetails', 'CRM_Activity_Form_Phonecall::showCallDetails');
-
--- /*******************************************************
--- *
--- * Insert Billing location type (used for billing address
--- * entered in online contribution forms)
--- *
--- *******************************************************/
-
- SELECT @domain_id := id from civicrm_domain;
- INSERT INTO `civicrm_location_type` ( `domain_id`, `name`, `vcard_name`, `description`, `is_reserved`, `is_active` )
- VALUES
- ( @domain_id, 'Billing', NULL, 'Billing Address location', 1, 1 );
-
--- /*******************************************************
--- *
--- * civicrm_option_group
--- *
--- *******************************************************/
-
- SELECT @domain_id := id from civicrm_domain;
- INSERT INTO `civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
- VALUES
- (@domain_id, 'participant_status', 'Participant Status', 0, 1),
- (@domain_id, 'participant_role', 'Participant Role', 0, 1),
- (@domain_id, 'event_type', 'Event Type', 0, 1);
-
--- /*******************************************************
--- *
--- * civicrm_option_value
--- *
--- *******************************************************/
-
- SELECT @option_group_id_ps := max(id) from civicrm_option_group where name = 'participant_status';
- SELECT @option_group_id_pRole := max(id) from civicrm_option_group where name = 'participant_role';
- SELECT @option_group_id_etype := max(id) from civicrm_option_group where name = 'event_type';
-
- INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
- VALUES
- (@option_group_id_ps, 'Registered', 1, 'Registered', NULL, 0, NULL, 1, NULL, 0, 1, 1),
- (@option_group_id_ps, 'Attended', 2, 'Attended', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_ps, 'No-show', 3, 'No-show', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_ps, 'Cancelled', 4, 'Cancelled', NULL, 0, NULL, 4, NULL, 0, 1, 1),
-
- (@option_group_id_pRole, 'Attendee', 1, 'Attendee', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_pRole, 'Volunteer', 2, 'Volunteer', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_pRole, 'Host', 3, 'Host', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_pRole, 'Speaker', 4, 'Speaker', NULL, 0, NULL, 4, NULL, 0, 0, 1),
-
- (@option_group_id_etype, 'Conference', 1, 'Conference', NULL, 0, NULL, 1, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Exhibition', 2, 'Exhibition', NULL, 0, NULL, 2, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Fundraiser', 3, 'Fundraiser', NULL, 0, NULL, 3, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Meeting', 4, 'Meeting', NULL, 0, NULL, 4, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Performance',5, 'Performance', NULL, 0, NULL, 5, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Workshop', 6, 'Workshop', NULL, 0, NULL, 6, NULL, 0, 0, 1 );
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * adding of new tables
--- *
--- *******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_event
--- *
--- *******************************************************/
-CREATE TABLE civicrm_event (
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event',
- domain_id int unsigned NOT NULL DEFAULT 0 COMMENT 'Event belongs to which Domain?',
- title varchar(255) COMMENT 'Event Title (e.g. Fall Fundraiser Dinner)',
- summary text COMMENT 'Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.',
- description text COMMENT 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
- event_type_id int unsigned DEFAULT 0 COMMENT 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
- is_public tinyint DEFAULT 1 COMMENT 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
- start_date datetime COMMENT 'Date and time that event starts.',
- end_date datetime COMMENT 'Date and time that event ends. May be NULL if no defined end date/time',
- is_online_registration tinyint DEFAULT 0 COMMENT 'If true, include registration link on Event Info page.',
- registration_link_text varchar(255) COMMENT 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
- max_participants int unsigned DEFAULT 0 COMMENT 'Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.',
- event_full_text text COMMENT 'Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.',
- is_monetary tinyint DEFAULT 0 COMMENT 'Is this a PAID event? If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
- contribution_type_id int unsigned DEFAULT 0 COMMENT 'Contribution type assigned to paid event registrations for this event. Required if is_monetary is true.',
- is_map tinyint DEFAULT 0 COMMENT 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
- is_active tinyint DEFAULT 0 COMMENT 'Is this Event enabled or disabled/cancelled?'
-,
- PRIMARY KEY ( id )
-,
- CONSTRAINT FK_civicrm_event_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_event_page
--- *
--- *******************************************************/
-CREATE TABLE civicrm_event_page (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event Page ID',
- event_id int unsigned NOT NULL COMMENT 'Event which this page belongs to.',
- intro_text text COMMENT 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
- footer_text text COMMENT 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
- confirm_title varchar(255) DEFAULT NULL COMMENT 'Title for Confirmation page.',
- confirm_text text COMMENT 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
- confirm_footer_text text COMMENT 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
- is_email_confirm tinyint DEFAULT 1 COMMENT 'If true, confirmation is automatically emailed to contact on successful registration.',
- confirm_email_text text COMMENT 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
- confirm_from_name varchar(255) COMMENT 'FROM email name used for confirmation emails.',
- confirm_from_email varchar(255) COMMENT 'FROM email address used for confirmation emails.',
- cc_confirm varchar(255) COMMENT 'comma-separated list of email addresses to cc each time a confirmation is sent',
- bcc_confirm varchar(255) COMMENT 'comma-separated list of email addresses to bcc each time a confirmation is sent',
- default_fee_id int unsigned NOT NULL COMMENT 'FK to civicrm_custom_option.',
- thankyou_title varchar(255) DEFAULT NULL COMMENT 'Title for ThankYou page.',
- thankyou_text text COMMENT 'ThankYou Text.',
- thankyou_footer_text text COMMENT 'Footer message.'
-,
- PRIMARY KEY ( id )
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_participant
--- *
--- *******************************************************/
-CREATE TABLE civicrm_participant (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Participant Id',
- contact_id int unsigned DEFAULT 0 COMMENT 'FK to Contact ID',
- event_id int unsigned DEFAULT 0 COMMENT 'FK to Event ID',
- status_id int unsigned DEFAULT 1 COMMENT 'Participant status ID. Implicit FK to civicrm_option_value where option_group = participant_status. Default of 1 should map to status = Registered.',
- role_id int unsigned DEFAULT NULL COMMENT 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
- register_date datetime COMMENT 'When did contact register for event?',
- source varchar(128) COMMENT 'Source of this event registration.',
- event_level varchar(255) COMMENT 'Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that we store the label value rather than an FK as the label stored in custom_option may change, but we dont want that to change the label in place at time of this registration.',
- is_test tinyint DEFAULT 0
-,
- PRIMARY KEY ( id )
-,
- CONSTRAINT FK_civicrm_participant_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-,
- CONSTRAINT FK_civicrm_participant_event_id FOREIGN KEY (event_id) REFERENCES civicrm_event(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_participant_payment
--- *
--- *******************************************************/
-CREATE TABLE civicrm_participant_payment (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Participant Payment Id',
- participant_id int unsigned NOT NULL COMMENT 'Participant Id (FK)',
- payment_entity_table varchar(128) COMMENT 'Table being referenced for payment entity (expected usage is civicrm_contribution).',
- payment_entity_id int unsigned NOT NULL COMMENT 'FK to table with payment record (e.g. civicrm_contribution.id).'
-,
- PRIMARY KEY ( id )
-,
- CONSTRAINT FK_civicrm_participant_payment_participant_id FOREIGN KEY (participant_id) REFERENCES civicrm_participant(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_currency
--- *
--- *******************************************************/
-CREATE TABLE civicrm_currency (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Currency Id',
- name varchar(64) COMMENT 'Currency Name',
- symbol varchar(8) COMMENT 'Currency Symbol'
-,
- PRIMARY KEY ( id )
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * Insert sample data to
--- *
--- *******************************************************/
- INSERT INTO `civicrm_currency` VALUES (1,'AUD','$'),(2,'CAD','$'),(3,'EUR','€'),(4,'GBP','£'),(5,'ILS','₪'),(6,'INR','₨'),(7,'JPY','¥'),(8,'KRW','₩'),(9,'LAK','₭'),(10,'MNT','₮'),(11,'NGN','₦'),(12,'PLN','zł'),(13,'THB','฿'),(14,'USD','$'),(15,'VND','₫'),(16,'ZAR','R');
-
-
--- /*******************************************************
--- *
--- * civicrm_address
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_address`
- MODIFY `geo_code_1` double NULL DEFAULT NULL COMMENT 'Latitude or UTM (Universal Transverse Mercator Grid) Northing.',
- MODIFY `geo_code_2` double NULL DEFAULT NULL COMMENT 'Longitude or UTM (Universal Transverse Mercator Grid) Easting.';
-
--- /*******************************************************
--- *
--- * civicrm_contact
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contact` ADD INDEX `UI_external_identifier` (`external_identifier`);
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- *******************************************************/
- ALTER TABLE `civicrm_contribution_page` ADD `default_amount_id` int unsigned NOT NULL COMMENT 'FK to civicrm_custom_option.';
- ALTER TABLE `civicrm_contribution_page` DROP `default_amount`;
-
--- /*******************************************************
--- *
--- * civicrm_custom_group
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_group` MODIFY extends enum('Contact','Individual','Household','Organization','Location','Address','Contribution','Activity','Relationship','Phonecall','Meeting','Group','Membership','Participant','Event') NULL DEFAULT 'Contact' COMMENT 'Type of object this group extends (can add other options later e.g. contact_address, etc.).';
-
-
--- /*******************************************************
--- *
--- * civicrm_custom_value
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_custom_value` MODIFY float_data double NULL DEFAULT NULL COMMENT 'stores data for ext property data_type = float.';
-
--- /*******************************************************
--- *
--- * civicrm_location_type
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_location_type` MODIFY vcard_name varchar(64) NULL DEFAULT NULL COMMENT 'vCard Location Type Name.';
-
--- /*******************************************************
--- *
--- * civicrm_mapping
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_mapping MODIFY mapping_type enum('Export','Import','Export Contributions','Import Contributions','Import Activity History','Search Builder','Import Memberships','Import Participants') NULL DEFAULT NULL COMMENT 'Type of Mapping.';
-
--- /*******************************************************
--- *
--- * civicrm_membership
--- *
--- *******************************************************/
- ALTER TABLE civicrm_membership ADD owner_membership_id int(10) UNSIGNED NULL DEFAULT NULL COMMENT 'Optional FK to Parent Membership.';
- ALTER TABLE civicrm_membership ADD INDEX index_owner_membership_id( owner_membership_id );
-
--- /*******************************************************
--- *
--- * civicrm_membership_type
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_membership_type` ADD `relationship_direction` varchar(6) NULL DEFAULT NULL COMMENT '';
- UPDATE `civicrm_membership_type` SET `relationship_direction`='a_b';
-
-
--- /*******************************************************
--- *
--- * civicrm_mapping_field
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_mapping_field ADD `relationship_direction` varchar(6) NULL DEFAULT NULL COMMENT '';
- UPDATE `civicrm_mapping_field` SET `relationship_direction`='a_b';
-
-
--- /*******************************************************
--- *
--- * civicrm_note
--- *
--- *******************************************************/
- INSERT INTO `civicrm_note`
- (`entity_table`, `contact_id`, `entity_id`, `note`)
- SELECT 'civicrm_contribution', `contact_id`, `civicrm_contribution`.`id`, `civicrm_contribution`.`note`
- FROM civicrm_contribution;
-
--- /*******************************************************
--- *
--- * civicrm_contribution
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_contribution` ADD INDEX `received_date` (`receive_date`);
- ALTER TABLE `civicrm_contribution` ADD `amount_level` varchar(255) NULL DEFAULT NULL COMMENT '' AFTER source;
- ALTER TABLE `civicrm_contribution` DROP `note`;
-
--- /*******************************************************
--- *
--- * civicrm_uf_group
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_group` ADD `is_uf_link` tinyint(4) NULL DEFAULT '0' COMMENT 'Should we display a link to the website profile in profile selector' AFTER is_edit_link;
- ALTER TABLE `civicrm_uf_group` ADD `is_update_dupe` tinyint(4) NULL DEFAULT '0' COMMENT 'Should we update the contact record if we find a duplicate' AFTER is_uf_link;
-
--- /*******************************************************
--- *
--- * civicrm_uf_match
--- *
--- *******************************************************/
-
- ALTER TABLE `civicrm_uf_match` DROP INDEX `UI_uf_id`;
- ALTER TABLE `civicrm_uf_match` ADD UNIQUE `UI_uf_domain_id`(`uf_id`, `domain_id`);
-
--- /*******************************************************
--- *
--- * CRM-1570 - migrate the old, CiviCRM 1.4 callbacks
--- * and fix (un-translate) localized activity names
--- *
--- *******************************************************/
-
- UPDATE civicrm_activity_history SET callback = 'CRM_Activity_BAO_Activity::showActivityDetails' WHERE callback IN ('CRM_Activity_Form_Meeting::showMeetingDetails', 'CRM_Activity_Form_OtherActivity::showOtherActivityDetails', 'CRM_Activity_Form_Phonecall::showCallDetails');
-
- UPDATE civicrm_activity_history SET activity_type = 'Meeting' WHERE activity_type IN ('Treffen', 'Cita', 'Tapaaminen', 'Reunion', 'Riunione', 'Bijeenkomst', 'Spotkanie');
- UPDATE civicrm_activity_history SET activity_type = 'Meeting' WHERE activity_type LIKE 'R%union';
- UPDATE civicrm_activity_history SET activity_type = 'Meeting' WHERE activity_type LIKE 'Tal%lkoz%';
- UPDATE civicrm_activity_history SET activity_type = 'Meeting' WHERE activity_type LIKE 'Reuni%o';
- UPDATE civicrm_activity_history SET activity_type = 'Meeting' WHERE activity_type LIKE '%nt%lnire';
- UPDATE civicrm_activity_history SET activity_type = 'Meeting' WHERE activity_type LIKE 'M%te(n)';
-
- UPDATE civicrm_activity_history SET activity_type = 'Phone Call' WHERE activity_type IN ('Telefonanruf', 'Puhelu', 'Appel', 'Telefonata', 'Telefoonoproep', 'Telefonsamtale', 'Rozmowa', 'Telefonema', 'Apel telefon', 'Telefonkontakt');
- UPDATE civicrm_activity_history SET activity_type = 'Phone Call' WHERE activity_type LIKE 'Llamada telef%nica';
- UPDATE civicrm_activity_history SET activity_type = 'Phone Call' WHERE activity_type LIKE 'Appel t%l%phonique';
- UPDATE civicrm_activity_history SET activity_type = 'Phone Call' WHERE activity_type LIKE 'Telefonh%v%s';
-
- UPDATE civicrm_activity_history SET activity_type = 'Email' WHERE activity_type IN ('Courriel', 'Epost', 'E-post');
- UPDATE civicrm_activity_history SET activity_type = 'Email' WHERE activity_type LIKE 'S%hk%posti';
-
- UPDATE civicrm_activity_history SET activity_type = 'Event' WHERE activity_type IN ('Evenement', 'Wydarzenie', 'Evento');
-
-
--- /*******************************************************
--- *
--- * Insert Billing location type (used for billing address
--- * entered in online contribution forms)
--- *
--- *******************************************************/
-
- SELECT @domain_id := id from civicrm_domain;
- INSERT INTO `civicrm_location_type` ( `domain_id`, `name`, `vcard_name`, `description`, `is_reserved`, `is_active` )
- VALUES
- ( @domain_id, 'Billing', NULL, 'Billing Address location', 1, 1 );
-
--- /*******************************************************
--- *
--- * civicrm_option_group
--- *
--- *******************************************************/
-
- SELECT @domain_id := id from civicrm_domain;
- INSERT INTO `civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
- VALUES
- (@domain_id, 'participant_status', 'Participant Status', 0, 1),
- (@domain_id, 'participant_role', 'Participant Role', 0, 1),
- (@domain_id, 'event_type', 'Event Type', 0, 1);
-
-
--- /*******************************************************
--- *
--- * civicrm_option_value
--- *
--- *******************************************************/
-
- SELECT @option_group_id_ps := max(id) from civicrm_option_group where name = 'participant_status';
- SELECT @option_group_id_pRole := max(id) from civicrm_option_group where name = 'participant_role';
- SELECT @option_group_id_etype := max(id) from civicrm_option_group where name = 'event_type';
-
- INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
- VALUES
- (@option_group_id_ps, 'Registered', 1, 'Registered', NULL, 0, NULL, 1, NULL, 0, 1, 1),
- (@option_group_id_ps, 'Attended', 2, 'Attended', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_ps, 'No-show', 3, 'No-show', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_ps, 'Cancelled', 4, 'Cancelled', NULL, 0, NULL, 4, NULL, 0, 1, 1),
-
- (@option_group_id_pRole, 'Attendee', 1, 'Attendee', NULL, 0, NULL, 1, NULL, 0, 0, 1),
- (@option_group_id_pRole, 'Volunteer', 2, 'Volunteer', NULL, 0, NULL, 2, NULL, 0, 0, 1),
- (@option_group_id_pRole, 'Host', 3, 'Host', NULL, 0, NULL, 3, NULL, 0, 0, 1),
- (@option_group_id_pRole, 'Speaker', 4, 'Speaker', NULL, 0, NULL, 4, NULL, 0, 0, 1),
-
- (@option_group_id_etype, 'Conference', 1, 'Conference', NULL, 0, NULL, 1, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Exhibition', 2, 'Exhibition', NULL, 0, NULL, 2, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Fundraiser', 3, 'Fundraiser', NULL, 0, NULL, 3, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Meeting', 4, 'Meeting', NULL, 0, NULL, 4, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Performance',5, 'Performance', NULL, 0, NULL, 5, NULL, 0, 0, 1 ),
- (@option_group_id_etype, 'Workshop', 6, 'Workshop', NULL, 0, NULL, 6, NULL, 0, 0, 1 );
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * Select DomainID
--- *
--- *******************************************************/
- SELECT @domain_id := id from civicrm_domain;
-
--- /*******************************************************
--- *
--- * civicrm_dedupe_rule_group
--- *
--- * Dedupe rule groups
--- *
--- *******************************************************/
-CREATE TABLE civicrm_dedupe_rule_group (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique dedupe rule group id',
- domain_id int unsigned NOT NULL COMMENT 'The id of the domain this rule group belongs to',
- contact_type enum('Individual', 'Organization', 'Household') COMMENT 'The type of contacts this group applies to',
- threshold int NOT NULL COMMENT 'The weight threshold the sum of the rule weights has to cross to consider two contacts the same'
-
-, PRIMARY KEY ( id )
-
-, CONSTRAINT FK_civicrm_dedupe_rule_group_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_dedupe_rule
--- *
--- * Dedupe rules for use by rule groups
--- *
--- *******************************************************/
-CREATE TABLE civicrm_dedupe_rule (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique dedupe rule id',
- dedupe_rule_group_id int unsigned NOT NULL COMMENT 'The id of the rule group this rule belongs to',
- rule_table varchar(64) NOT NULL COMMENT 'The name of the table this rule is about',
- rule_field varchar(64) NOT NULL COMMENT 'The name of the field of the table referenced in rule_table',
- rule_length int unsigned COMMENT 'The length of the matching substring',
- rule_weight int NOT NULL COMMENT 'The weight of the rule'
-
-, PRIMARY KEY ( id )
-
-, CONSTRAINT FK_civicrm_dedupe_rule_dedupe_rule_group_id FOREIGN KEY (dedupe_rule_group_id) REFERENCES civicrm_dedupe_rule_group(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_participant
--- *
--- *******************************************************/
- ALTER TABLE civicrm_participant
- ADD INDEX index_status_id (status_id),
- ADD INDEX index_role_id (role_id);
-
--- /*******************************************************
--- *
--- * civicrm_payment_processor
--- *
--- *******************************************************/
-CREATE TABLE civicrm_payment_processor (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Payment Processor ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this payment processor.',
- name varchar(64) COMMENT 'Payment Processor Name.',
- description varchar(255) COMMENT 'Payment Processor Description.',
- payment_processor_type varchar(255) COMMENT 'Payment Processor Type.',
- is_active tinyint COMMENT 'Is this processor active?',
- is_default tinyint COMMENT 'Is this processor the default?',
- is_test tinyint COMMENT 'Is this processor for a test site?',
- user_name varchar(255),
- password varchar(255),
- signature varchar(255),
- url_site varchar(255),
- url_recur varchar(255),
- url_button varchar(255),
- subject varchar(255),
- class_name varchar(255),
- billing_mode int unsigned NOT NULL COMMENT 'Billing Mode',
- is_recur tinyint COMMENT 'Can process recurring contributions'
-
-, PRIMARY KEY ( id )
-
-, UNIQUE INDEX UI_name_test( name, is_test )
-
-, CONSTRAINT FK_civicrm_payment_processor_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_payment_processor_type
--- *
--- *******************************************************/
-CREATE TABLE civicrm_payment_processor_type (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Payment Processor Type ID',
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this payment processor.',
- name varchar(64) COMMENT 'Payment Processor Name.',
- title varchar(64) COMMENT 'Payment Processor Name.',
- description varchar(255) COMMENT 'Payment Processor Description.',
- is_active tinyint COMMENT 'Is this processor active?',
- is_default tinyint COMMENT 'Is this processor the default?',
- user_name_label varchar(255),
- password_label varchar(255),
- signature_label varchar(255),
- subject_label varchar(255),
- class_name varchar(255),
- url_site_default varchar(255),
- url_recur_default varchar(255),
- url_button_default varchar(255),
- url_site_test_default varchar(255),
- url_recur_test_default varchar(255),
- url_button_test_default varchar(255),
- billing_mode int unsigned NOT NULL COMMENT 'Billing Mode',
- is_recur tinyint COMMENT 'Can process recurring contributions'
-,
- PRIMARY KEY ( id )
-
-, UNIQUE INDEX UI_name( name )
-
-, CONSTRAINT FK_civicrm_payment_processor_type_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_preferences
--- *
--- * Define preferences for the site and users
--- *
--- *******************************************************/
-CREATE TABLE civicrm_preferences (
-
-
- id int unsigned NOT NULL AUTO_INCREMENT ,
- domain_id int unsigned NOT NULL COMMENT 'Which Domain owns this contact',
- contact_id int unsigned COMMENT 'FK to Contact ID',
- is_domain tinyint COMMENT 'Is this the record for the domain setting?',
- location_count int unsigned COMMENT 'Number of locations to be displayed on edit page?',
- contact_view_options varchar(128) COMMENT 'What tabs are displayed in the contact summary',
- contact_edit_options varchar(128) COMMENT 'What tabs are displayed in the contact edit',
- advanced_search_options varchar(128) COMMENT 'What tabs are displayed in the advanced search screen',
- user_dashboard_options varchar(128) COMMENT 'What tabs are displayed in the contact edit',
- address_options varchar(128) COMMENT 'What fields are displayed from the address table',
- address_format text COMMENT 'Format to display the address',
- mailing_format text COMMENT 'Format to display a mailing label',
- individual_name_format text COMMENT 'Format to display a individual name',
- address_standardization_provider varchar(64) COMMENT 'object name of provider for address standarization',
- address_standardization_userid varchar(64) COMMENT 'user id for provider login',
- address_standardization_url varchar(255) COMMENT 'url of address standardization service'
-,
- PRIMARY KEY ( id )
-
- , INDEX index_contact_view_options(
- contact_view_options
- )
- , INDEX index_contact_edit_options(
- contact_edit_options
- )
- , INDEX index_advanced_search_options(
- advanced_search_options
- )
- , INDEX index_user_dashboard_options(
- user_dashboard_options
- )
- , INDEX index_address_options(
- address_options
- )
-
-,
- CONSTRAINT FK_civicrm_preferences_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-,
- CONSTRAINT FK_civicrm_preferences_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_price_set
--- *
--- *******************************************************/
-CREATE TABLE civicrm_price_set (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Price Set',
- domain_id int unsigned NOT NULL COMMENT 'Which domain owns this price set',
- name varchar(64) NOT NULL COMMENT 'Variable name/programmatic handle for this group',
- title varchar(64) NOT NULL COMMENT 'Friendly name',
- is_active tinyint DEFAULT 1 COMMENT 'Is this price set active',
- help_pre text COMMENT 'Description and/or help text to display before fields in form.',
- help_post text COMMENT 'Description and/or help text to display after fields in form.',
- javascript varchar(64) COMMENT 'Optional Javascript script function(s) included on the form with this price_set. Can be used for conditional'
-
-, PRIMARY KEY ( id )
-
-, UNIQUE INDEX UI_name( name )
-
-, UNIQUE INDEX UI_title( title )
-
-, CONSTRAINT FK_civicrm_price_set_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
--- /*******************************************************
--- *
--- * civicrm_price_field
--- *
--- *******************************************************/
-CREATE TABLE civicrm_price_field (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Price Field',
- price_set_id int unsigned NOT NULL COMMENT 'FK to civicrm_price_set',
- name varchar(64) NOT NULL COMMENT 'Variable name/programmatic handle for this field',
- label varchar(64) NOT NULL COMMENT 'Text for form field label (also friendly name for administering this field)',
- html_type enum('Text', 'Select', 'Radio', 'CheckBox') NOT NULL ,
- is_enter_qty tinyint DEFAULT 0 COMMENT 'Enter a quantity for this field?',
- help_pre text COMMENT 'Description and/or help text to display before this field.',
- help_post text COMMENT 'Description and/or help text to display after this field.',
- weight int DEFAULT 1 COMMENT 'Order in which the fields should appear',
- is_display_amounts tinyint DEFAULT 1 COMMENT 'Should the price be displayed next to the label for each option?',
- options_per_line int unsigned DEFAULT 1 COMMENT 'number of options per line for checkbox and radio',
- is_active tinyint DEFAULT 1 COMMENT 'Is this price field active',
- is_required tinyint DEFAULT 1 COMMENT 'Is this price field required (value must be > 1)',
- active_on datetime DEFAULT 0 COMMENT 'If non-zero, do not show this field before the date specified',
- expire_on datetime DEFAULT 0 COMMENT 'If non-zero, do not show this field after the date specified',
- javascript varchar(255) COMMENT 'Optional scripting attributes for field'
-
-, PRIMARY KEY ( id )
-
-, INDEX index_name( name )
-
-, CONSTRAINT FK_civicrm_price_field_price_set_id FOREIGN KEY (price_set_id) REFERENCES civicrm_price_set(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_price_set_entity
--- *
--- *******************************************************/
-CREATE TABLE civicrm_price_set_entity (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Price Set Entity',
- entity_table varchar(64) NOT NULL COMMENT 'Table which uses this price set',
- entity_id int unsigned NOT NULL COMMENT 'Item in table',
- price_set_id int unsigned NOT NULL COMMENT 'price set being used'
-
-, PRIMARY KEY ( id )
-
-, UNIQUE INDEX UI_entity( entity_table, entity_id )
-
-, CONSTRAINT FK_civicrm_price_set_entity_price_set_id FOREIGN KEY (price_set_id) REFERENCES civicrm_price_set(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * civicrm_line_item
--- *
--- *******************************************************/
-CREATE TABLE civicrm_line_item (
-
- id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Line Item',
- entity_table varchar(64) NOT NULL COMMENT 'table which has the transaction',
- entity_id int unsigned NOT NULL COMMENT 'entry in table',
- price_field_id int unsigned NOT NULL COMMENT 'FK to price_field',
- custom_option_id int unsigned NOT NULL COMMENT 'FK to custom_option',
- label varchar(255) NOT NULL COMMENT 'descriptive label for item - from custom_option.label',
- qty int unsigned NOT NULL COMMENT 'How many items ordered',
- unit_price decimal(20,2) NOT NULL COMMENT 'price of each item',
- line_total decimal(20,2) NOT NULL COMMENT 'qty * unit_price'
-
-, PRIMARY KEY ( id )
-
-, CONSTRAINT FK_civicrm_line_item_price_field_id FOREIGN KEY (price_field_id) REFERENCES civicrm_price_field(id)
-
-, CONSTRAINT FK_civicrm_line_item_custom_option_id FOREIGN KEY (custom_option_id) REFERENCES civicrm_custom_option(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * Modifying Tables
--- *
--- *******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_activity_history
--- *
--- *******************************************************/
- ALTER TABLE civicrm_activity_history
- ADD is_test tinyint(4) NULL DEFAULT '0';
-
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- *******************************************************/
- ALTER TABLE civicrm_contribution_page
- ADD `start_date` datetime NULL DEFAULT NULL,
- ADD `end_date` datetime NULL DEFAULT NULL,
- ADD payment_processor_id int(10) unsigned NULL DEFAULT NULL,
- ADD CONSTRAINT FK_civicrm_contribution_page_payment_processor_id FOREIGN KEY (payment_processor_id) REFERENCES civicrm_payment_processor(id);
-
-
--- /*******************************************************
--- *
--- * civicrm_custom_field
--- *
--- *******************************************************/
- ALTER TABLE civicrm_custom_field
- MODIFY data_type enum('String','Int','Float','Money','Memo','Date','Boolean','StateProvince','Country','File','Link') NULL DEFAULT NULL,
- MODIFY html_type enum('Text','TextArea','Select','Multi-Select','Radio','CheckBox','Select Date','Select State/Province','Select Country','File','Link') NULL DEFAULT NULL;
-
-
--- /*******************************************************
--- *
--- * civicrm_event
--- *
--- *******************************************************/
- ALTER TABLE civicrm_event
- ADD registration_start_date datetime NULL DEFAULT NULL,
- ADD registration_end_date datetime NULL DEFAULT NULL,
- ADD fee_label varchar(255) NULL DEFAULT NULL,
- ADD is_show_location tinyint(4) NULL DEFAULT '1',
- ADD payment_processor_id int(10) unsigned NULL DEFAULT NULL AFTER contribution_type_id,
- ADD CONSTRAINT FK_civicrm_event_payment_processor_id FOREIGN KEY (payment_processor_id) REFERENCES civicrm_payment_processor(id),
- ADD INDEX index_event_type_id (event_type_id);
-
-
--- /*******************************************************
--- *
--- * civicrm_household
--- *
--- *******************************************************/
- ALTER TABLE civicrm_household
- ADD INDEX index_household_name (household_name);
-
--- /*******************************************************
--- *
--- * civicrm_individual
--- *
--- *******************************************************/
- ALTER TABLE civicrm_individual
- ADD INDEX index_first_name (first_name),
- ADD INDEX index_last_name (last_name);
-
--- /*******************************************************
--- *
--- * civicrm_line_item
--- *
--- *******************************************************/
- ALTER TABLE civicrm_line_item
- ADD INDEX index_entity (entity_table, entity_id);
-
-
-
--- /*******************************************************
--- *
--- * civicrm_location
--- *
--- *******************************************************/
- ALTER TABLE civicrm_location
- MODIFY location_type_id int(10) unsigned NULL DEFAULT NULL;
-
-
--- /*******************************************************
--- *
--- * civicrm_membership
--- *
--- *******************************************************/
- ALTER TABLE civicrm_membership
- ADD is_test tinyint(4) NULL DEFAULT '0';
-
-
--- /*******************************************************
--- *
--- * civicrm_membership_type
--- *
--- *******************************************************/
- ALTER TABLE civicrm_membership_type ALTER fixed_period_start_day DROP DEFAULT;
- ALTER TABLE civicrm_membership_type ALTER fixed_period_rollover_day DROP DEFAULT;
-
-
--- /*******************************************************
--- *
--- * civicrm_option_group
--- *
--- *******************************************************/
- ALTER TABLE civicrm_option_group
- ADD label varchar(255) NULL DEFAULT NULL;
-
--- /*******************************************************
--- *
--- * civicrm_option_value
--- *
--- *******************************************************/
- ALTER TABLE civicrm_option_value
- MODIFY filter int(10) unsigned DEFAULT NULL;
-
--- /*******************************************************
--- *
--- * civicrm_organization
--- *
--- *******************************************************/
- ALTER TABLE civicrm_organization
- ADD INDEX index_organization_name (organization_name);
-
-
-
--- /*******************************************************
--- *
--- * Insert data into civicrm_payment_processor_type
--- *
--- *******************************************************/
-
- INSERT INTO civicrm_payment_processor_type
- (domain_id, name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_recur_default, url_button_default, url_site_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur )
- VALUES
- (@domain_id,'Dummy','Dummy Payment Processor',NULL,1,1,'User Name',NULL,NULL,NULL,'Payment_Dummy',NULL,NULL,NULL,NULL,NULL,NULL,1,NULL),
- (@domain_id,'PayPal_Standard','PayPal - Website Payments Standard',NULL,1,0,'Merchant Account Email',NULL,NULL,NULL,'Payment_PayPalImpl','https://www.paypal.com/','https://www.paypal.com/',NULL,'https://www.sandbox.paypal.com/','https://www.sandbox.paypal.com/',NULL,4,1),
- (@domain_id,'PayPal','PayPal - Website Payments Pro',NULL,1,0,'User Name','Password','Signature',NULL,'Payment_PayPalImpl','https://www.paypal.com/',NULL,'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif','https://www.sandbox.paypal.com/',NULL,'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif',3,NULL),
- (@domain_id,'PayPal_Express','PayPal - Express',NULL,1,0,'User Name','Password','Signature',NULL,'Payment_PayPalImpl','https://www.paypal.com/',NULL,'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif','https://www.sandbox.paypal.com/',NULL,'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif',3,NULL),
- (@domain_id,'Google_Checkout','Google Checkout',NULL,1,0,'Merchant ID','Key',NULL,NULL,'Payment_Google','https://checkout.google.com/',NULL,'http://checkout.google.com/buttons/checkout.gif','https://sandbox.google.com/checkout',NULL,'http://sandbox.google.com/checkout/buttons/checkout.gif',4,NULL),
- (@domain_id,'Moneris','Moneris',NULL,1,0,'User Name','Password','Store ID',NULL,'Payment_Moneris','https://www3.moneris.com/',NULL,NULL,'https://esqa.moneris.com/',NULL,NULL,1,1),
- (@domain_id,'AuthNet_AIM','Authorize.Net - AIM',NULL,1,0,'API Login','Payment Key','MD5 Hash',NULL,'Payment_AuthorizeNet','https://secure.authorize.net/gateway/transact.dll','https://api.authorize.net/xml/v1/request.api',NULL,'https://secure.authorize.net/gateway/transact.dll','https://apitest.authorize.net/xml/v1/request.api',NULL,1,1);
-
-
--- /*******************************************************
--- *
--- * civicrm_uf_group
--- *
--- *******************************************************/
- ALTER TABLE civicrm_uf_group
- ADD is_cms_user tinyint(4) NULL DEFAULT '0',
- ADD notify varchar(255) NULL DEFAULT NULL COMMENT 'If you want member(s) of your organization to receive a notification email whenever this Profile form is used to enter or update contact information, enter one or more email addresses here separated by a comma';
-
-
--- /*******************************************************
--- *
--- * civicrm_option_group and civicrm_option_value
--- *
--- *******************************************************/
-
- INSERT INTO
- civicrm_option_group (domain_id, name, description, is_reserved, is_active)
- VALUES
- (@domain_id, 'contact_view_options', 'Contact View Options', 0, 1),
- (@domain_id, 'contact_edit_options', 'Contact Edit Options', 0, 1),
- (@domain_id, 'advanced_search_options', 'Advanced Search Options', 0, 1),
- (@domain_id, 'user_dashboard_options', 'User Dashboard Options', 0, 1),
- (@domain_id, 'address_options', 'Addressing Options', 0, 1);
-
- SELECT @option_group_id_cvOpt := max(id) from civicrm_option_group where name = 'contact_view_options';
- SELECT @option_group_id_ceOpt := max(id) from civicrm_option_group where name = 'contact_edit_options';
- SELECT @option_group_id_asOpt := max(id) from civicrm_option_group where name = 'advanced_search_options';
- SELECT @option_group_id_udOpt := max(id) from civicrm_option_group where name = 'user_dashboard_options';
- SELECT @option_group_id_adOpt := max(id) from civicrm_option_group where name = 'address_options';
-
- INSERT INTO
- civicrm_option_value (option_group_id, label, value, name, grouping, filter, is_default, weight, description, is_optgroup, is_reserved, is_active)
- VALUES
- (@option_group_id_cvOpt, 'Activities' , 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Relationships', 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Groups' , 3, NULL, NULL, 0, NULL, 3, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Notes' , 4, NULL, NULL, 0, NULL, 4, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Tags' , 5, NULL, NULL, 0, NULL, 5, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Change Log' , 6, NULL, NULL, 0, NULL, 6, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Contributions', 7, NULL, NULL, 0, NULL, 7, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Memberships' , 8, NULL, NULL, 0, NULL, 8, NULL, 0, 0, 1 ),
- (@option_group_id_cvOpt, 'Events' , 9, NULL, NULL, 0, NULL, 9, NULL, 0, 0, 1 ),
-
- (@option_group_id_ceOpt, 'Communication Preferences', 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1 ),
- (@option_group_id_ceOpt, 'Demographics' , 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1 ),
- (@option_group_id_ceOpt, 'Tags and Groups' , 3, NULL, NULL, 0, NULL, 3, NULL, 0, 0, 1 ),
- (@option_group_id_ceOpt, 'Notes' , 4, NULL, NULL, 0, NULL, 4, NULL, 0, 0, 1 ),
-
- (@option_group_id_asOpt, 'Address Fields' , 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Custom Fields' , 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Activity History' , 3, NULL, NULL, 0, NULL, 3, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Scheduled Activities', 4, NULL, NULL, 0, NULL, 4, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Relationships' , 5, NULL, NULL, 0, NULL, 5, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Notes' , 6, NULL, NULL, 0, NULL, 6, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Change Log' , 7, NULL, NULL, 0, NULL, 7, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Contributions' , 8, NULL, NULL, 0, NULL, 8, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Memberships' , 9, NULL, NULL, 0, NULL, 9, NULL, 0, 0, 1 ),
- (@option_group_id_asOpt, 'Events' , 10, NULL, NULL, 0, NULL, 10, NULL, 0, 0, 1 ),
-
- (@option_group_id_udOpt, 'Groups' , 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1 ),
- (@option_group_id_udOpt, 'Contributions', 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1 ),
- (@option_group_id_udOpt, 'Memberships' , 3, NULL, NULL, 0, NULL, 3, NULL, 0, 0, 1 ),
- (@option_group_id_udOpt, 'Events' , 4, NULL, NULL, 0, NULL, 4, NULL, 0, 0, 1 ),
-
- (@option_group_id_adOpt, 'Street Address' , 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'Addt\'l Address 1' , 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'Addt\'l Address 2' , 3, NULL, NULL, 0, NULL, 3, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'City' , 4, NULL, NULL, 0, NULL, 4, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'Zip / Postal Code', 5, NULL, NULL, 0, NULL, 5, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'Postal Code Suffix', 6, NULL, NULL, 0, NULL, 6, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'County' , 7, NULL, NULL, 0, NULL, 7, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'State / Province' , 8, NULL, NULL, 0, NULL, 8, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'Country' , 9, NULL, NULL, 0, NULL, 9, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'Latitude' , 10, NULL, NULL, 0, NULL, 10, NULL, 0, 0, 1 ),
- (@option_group_id_adOpt, 'Longitude' , 11, NULL, NULL, 0, NULL, 11, NULL, 0, 0, 1 );
-
-
--- /*******************************************************
--- *
--- * civicrm_preferences
--- *
--- *******************************************************/
- INSERT INTO
- civicrm_preferences(domain_id, contact_id, is_domain, location_count, contact_view_options, contact_edit_options, advanced_search_options, user_dashboard_options, address_options, address_format, mailing_format, individual_name_format, address_standardization_provider, address_standardization_userid, address_standardization_url )
- VALUES
- (@domain_id,NULL,1,1,'\ 11\ 12\ 13\ 14\ 15\ 16\ 17\ 18\ 19\ 1','\ 11\ 12\ 13\ 14\ 1','\ 11\ 12\ 13\ 14\ 15\ 16\ 17\ 18\ 19\ 110\ 1','\ 11\ 12\ 13\ 14\ 1','\ 11\ 12\ 13\ 14\ 15\ 16\ 18\ 19\ 110\ 111\ 1','{street_address}\n{supplemental_address_1}\n{supplemental_address_2}\n{city}{, }{state_province}{ }{postal_code}\n{country}','{street_address}\n{supplemental_address_1}\n{supplemental_address_2}\n{city}{, }{state_province}{ }{postal_code}\n{country}','{individual_prefix}{ } {first_name}{ }{middle_name}{ }{last_name}{ }{individual_suffix}',NULL,NULL,NULL);
-
--- /*******************************************************
--- *
--- * CRM-2064
--- *
--- *******************************************************/
-UPDATE civicrm_location_type SET name = 'Billing' WHERE name IN ('Facturering', 'Facturation', 'Faturamento');
-
-
--- /*******************************************************
--- *
--- * dupe rule defaults
--- *
--- *******************************************************/
-
-INSERT INTO civicrm_dedupe_rule_group (domain_id, contact_type, threshold) VALUES (@domain_id, 'Individual', 20);
-
-SELECT @dedupe_rule_group_id := MAX(id) FROM civicrm_dedupe_rule_group;
-
-INSERT INTO civicrm_dedupe_rule (dedupe_rule_group_id, rule_table, rule_field, rule_weight)
- VALUES
- (@dedupe_rule_group_id, 'civicrm_individual', 'first_name', 5),
- (@dedupe_rule_group_id, 'civicrm_individual', 'last_name', 7),
- (@dedupe_rule_group_id, 'civicrm_email', 'email', 10);
-
-INSERT INTO civicrm_dedupe_rule_group (domain_id, contact_type, threshold) VALUES (@domain_id, 'Organization', 10);
-
-SELECT @dedupe_rule_group_id := MAX(id) FROM civicrm_dedupe_rule_group;
-
-INSERT INTO civicrm_dedupe_rule (dedupe_rule_group_id, rule_table, rule_field, rule_weight)
-VALUES
- (@dedupe_rule_group_id, 'civicrm_organization', 'organization_name', 5),
- (@dedupe_rule_group_id, 'civicrm_email', 'email', 5);
-
-INSERT INTO civicrm_dedupe_rule_group (domain_id, contact_type, threshold) VALUES (@domain_id, 'Household', 10);
-
-SELECT @dedupe_rule_group_id := MAX(id) FROM civicrm_dedupe_rule_group;
-
-INSERT INTO civicrm_dedupe_rule (dedupe_rule_group_id, rule_table, rule_field, rule_weight)
-VALUES
- (@dedupe_rule_group_id, 'civicrm_household', 'household_name', 5),
- (@dedupe_rule_group_id, 'civicrm_email', 'email', 5);
-
--- /*******************************************************
--- *
--- * CRM-2125
--- *
--- *******************************************************/
-INSERT IGNORE INTO civicrm_state_province (id,country_id, abbreviation, name) VALUES
-(5177, 1098, "CW", "Central and Western"),
-(5178, 1098, "EA", "Eastern"),
-(5179, 1098, "SO", "Southern"),
-(5180, 1098, "WC", "Wan Chai"),
-(5181, 1098, "KC", "Kowloon City"),
-(5182, 1098, "KU", "Kwun Tong"),
-(5183, 1098, "SS", "Sham Shui Po"),
-(5184, 1098, "WT", "Wong Tai Sin"),
-(5185, 1098, "YT", "Yau Tsim Mong"),
-(5186, 1098, "IS", "Islands"),
-(5187, 1098, "KI", "Kwai Tsing"),
-(5188, 1098, "NO", "North"),
-(5189, 1098, "SK", "Sai Kung"),
-(5190, 1098, "ST", "Sha Tin"),
-(5191, 1098, "TP", "Tai Po"),
-(5192, 1098, "TW", "Tsuen Wan"),
-(5193, 1098, "TM", "Tuen Mun"),
-(5194, 1098, "YL", "Yuen Long");
-
--- /*******************************************************
--- *
--- * CRM-2130
--- *
--- *******************************************************/
-INSERT IGNORE INTO civicrm_country (id, name, iso_code) VALUES ("1242", "Serbia", "RS");
-INSERT IGNORE INTO civicrm_country (id, name, iso_code) VALUES ("1243", "Montenegro", "ME");
-
--- /*******************************************************
--- *
--- * CRM-2131
--- *
--- *******************************************************/
-INSERT IGNORE INTO civicrm_country (id, name, iso_code) VALUES ("1244", "Jersey", "JE");
-INSERT IGNORE INTO civicrm_country (id, name, iso_code) VALUES ("1245", "Guernsey", "GG");
-INSERT IGNORE INTO civicrm_country (id, name, iso_code) VALUES ("1246", "Isle of Man", "IM");
+++ /dev/null
--- +--------------------------------------------------------------------+
--- | CiviCRM version 4.6 |
--- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2015 |
--- +--------------------------------------------------------------------+
--- | This file is a part of CiviCRM. |
--- | |
--- | CiviCRM is free software; you can copy, modify, and distribute it |
--- | under the terms of the GNU Affero General Public License |
--- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
--- | |
--- | CiviCRM is distributed in the hope that it will be useful, but |
--- | WITHOUT ANY WARRANTY; without even the implied warranty of |
--- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
--- | See the GNU Affero General Public License for more details. |
--- | |
--- | You should have received a copy of the GNU Affero General Public |
--- | License and the CiviCRM Licensing Exception along |
--- | with this program; if not, contact CiviCRM LLC |
--- | at info[AT]civicrm[DOT]org. If you have questions about the |
--- | GNU Affero General Public License or the licensing of CiviCRM, |
--- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
--- +--------------------------------------------------------------------+
--- /*******************************************************
--- *
--- * Select DomainID
--- *
--- *******************************************************/
- SELECT @domain_id := id from civicrm_domain;
-
--- /*******************************************************
--- *
--- * civicrm_mailing_spool
--- *
--- *******************************************************/
-CREATE TABLE civicrm_mailing_spool (
-
-
- id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '',
- domain_id int(10) unsigned NOT NULL COMMENT 'The ID of the civicrm domain.',
- job_id int(10) unsigned NOT NULL COMMENT 'The ID of the Job .',
- recipient_email text NULL DEFAULT NULL COMMENT 'The email of the receipients this mail is to be sent.',
- headers text NULL DEFAULT NULL COMMENT 'The header information of this mailing .',
- body text NULL DEFAULT NULL COMMENT 'The body of this mailing.',
- added_at datetime NULL DEFAULT NULL COMMENT 'date on which this job was added.',
- removed_at datetime NULL DEFAULT NULL COMMENT 'date on which this job was removed.'
-,
- PRIMARY KEY ( id )
-,
- CONSTRAINT FK_civicrm_mailing_spool_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
-, CONSTRAINT FK_civicrm_mailing_spool_job_id FOREIGN KEY (job_id) REFERENCES civicrm_mailing_job(id)
-
-) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-
-
--- /*******************************************************
--- *
--- * Modifying Tables
--- *
--- *******************************************************/
-
--- /*******************************************************
--- *
--- * civicrm_email
--- *
--- *******************************************************/
- ALTER TABLE civicrm_email
- ADD is_bulkmail tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Is this address for bulk mail ?';
-
--- /*******************************************************
--- *
--- * civicrm_payment_processor_type
--- *
--- *******************************************************/
-
- ALTER TABLE civicrm_payment_processor_type
- DROP INDEX UI_name,
- ADD UNIQUE INDEX UI_name_domain_id( name, domain_id );
-
-
--- /*******************************************************
--- *
--- * civicrm_domain
--- *
--- *******************************************************/
- ALTER TABLE civicrm_domain
- ADD email_name varchar(255) NULL DEFAULT NULL COMMENT 'The default email name that is used in the from address for all outgoing emails',
- ADD email_address varchar(255) NULL DEFAULT NULL COMMENT 'The default email address that is used as the from address for all outgoing emails',
- DROP contact_name;
-
- UPDATE `civicrm_domain` SET `email_name`='FIXME';
- UPDATE `civicrm_domain` SET `email_address`='info@EXAMPLE.ORG';
- UPDATE `civicrm_domain` SET `email_domain`='EXAMPLE.ORG';
-
--- /*******************************************************
--- *
--- * civicrm_mailing_job
--- *
--- *******************************************************/
- ALTER TABLE civicrm_mailing_job
- ADD is_test tinyint(4) DEFAULT 0 COMMENT 'Is this job for a test mail?',
- DROP is_retry;
-
- UPDATE civicrm_mailing_job
- SET is_test = 0;
-
-
--- /*******************************************************
--- *
--- * civicrm_currency
--- *
--- *******************************************************/
- ALTER TABLE civicrm_currency
- ADD numeric_code varchar(3) NULL DEFAULT NULL COMMENT 'Numeric currency code',
- ADD full_name varchar(64) NULL DEFAULT NULL COMMENT 'Full currency name';
-
--- /*******************************************************
--- *
--- * civicrm_mailing
--- *
--- *******************************************************/
- ALTER TABLE civicrm_mailing
- ADD resubscribe_id int(10) unsigned NOT NULL,
- ADD msg_template_id int(10) unsigned NULL DEFAULT NULL ,
- ADD CONSTRAINT FK_civicrm_mailing_msg_template_id FOREIGN KEY (msg_template_id) REFERENCES civicrm_msg_template(id),
- DROP is_template;
-
--- /*******************************************************
--- *
--- * civicrm_mailing_component
--- *
--- *******************************************************/
- ALTER TABLE civicrm_mailing_component
- MODIFY component_type enum('Header','Footer','Subscribe','Welcome','Unsubscribe','OptOut','Reply','Resubscribe') NULL DEFAULT NULL;
-
--- /*******************************************************
--- *
--- * civicrm_group
--- *
--- *******************************************************/
- ALTER TABLE civicrm_group
- ADD group_type varchar(128) NULL DEFAULT NULL COMMENT 'FK to group type',
- ADD INDEX index_group_type (group_type);
-
--- /*******************************************************
--- *
--- * civicrm_contribution_page
--- *
--- *******************************************************/
- ALTER TABLE civicrm_contribution_page
- MODIFY default_amount_id int(10) unsigned NULL DEFAULT NULL COMMENT 'FK to civicrm_custom_option.';
-
--- /*******************************************************
--- *
--- * CRM-2260
--- *
--- *******************************************************/
-
- REPLACE
- civicrm_currency (id, name, symbol, numeric_code, full_name)
- VALUES
- ( 1, "AUD", "$", "036", "Australian Dollar"),
- ( 2, "CAD", "$", "124", "Canadian Dollar"),
- ( 3, "EUR", "€", "978", "Euro"),
- ( 4, "GBP", "£", "826", "Pound Sterling"),
- ( 5, "ILS", "₪", "826", "New Israeli Shekel"),
- ( 6, "INR", "₨", "356", "Indian Rupee"),
- ( 7, "JPY", "Â¥", "392", "Japanese Yen"),
- ( 8, "KRW", "â‚©", "410", "South Korean Won"),
- ( 9, "LAK", "â‚", "418", "Lao Kip"),
- ( 10, "MNT", "â‚®", "496", "Mongolian Tugrik"),
- ( 11, "NGN", "₦", "566", "Nigerian Naira"),
- ( 12, "PLN", "zł", "985", "Polish Złoty"),
- ( 13, "THB", "฿", "764", "Thai Baht"),
- ( 14, "USD", "$", "840", "US Dollar"),
- ( 15, "VND", "â‚«", "704", "Viet Nam Dong"),
- ( 16, "ZAR", "R", "710", "South African Rand"),
- ( 17, "AED", NULL, "784", "UAE Dirham"),
- ( 18, "AFN", "Ø‹", "971", "Afghani"),
- ( 19, "ALL","Lek", "008", "Albanian Lek"),
- ( 20, "AMD", NULL, "051", "Armenian Dram"),
- ( 21, "ANG", "Æ’", "532", "Netherlands Antillian Guilder"),
- ( 22, "AOA", NULL, "973", "Angola Kwanza"),
- ( 23, "ARS", "$", "032", "Argentine Peso"),
- ( 24, "AWG", "Æ’", "533", "Aruban Guilder"),
- ( 25, "AZN","ман", "944", "Azerbaijanian Manat"),
- ( 26, "BAM", "KM", "977", "Convertible Marks"),
- ( 27, "BBD", "$", "052", "Barbados Dollar"),
- ( 28, "BDT", NULL, "050", "Bangladeshi Taka"),
- ( 29, "BGN", "лв", "975", "Bulgarian Lev"),
- ( 30, "BHD", NULL, "048", "Bahraini Dinar"),
- ( 31, "BIF", NULL, "108", "Burundi Franc"),
- ( 32, "BMD", "$", "060", "Bermudian Dollar"),
- ( 33, "BND", "$", "096", "Brunei Dollar"),
- ( 34, "BOB", "$b", "068", "Boliviano"),
- ( 35, "BOV", NULL, "984", "Bolivian Mvdol"),
- ( 36, "BRL", "R$", "986", "Brazilian Real"),
- ( 37, "BSD", "$", "044", "Bahamian Dollar"),
- ( 38, "BTN", NULL, "064", "Bhutan Ngultrum"),
- ( 39, "BWP", "P", "072", "Botswana Pula"),
- ( 40, "BYR", "p.", "974", "Belarussian Rouble"),
- ( 41, "BZD","BZ$", "084", "Belize Dollar"),
- ( 42, "CDF", NULL, "976", "Franc Congolais"),
- ( 43, "CHE", NULL, "947", "WIR Euro"),
- ( 44, "CHF","CHF", "756", "Swiss Franc"),
- ( 45, "CHW", NULL, "948", "WIR Franc"),
- ( 46, "CLF", NULL, "990", "Unidades de fomento"),
- ( 47, "CLP", "$", "152", "Chilean Peso"),
- ( 48, "CNY", "Ã¥
-ƒ", "156", "Chinese Yuan Renminbi"),
- ( 49, "COP", "$", "170", "Colombian Peso"),
- ( 50, "COU", NULL, "970", "Unidad de Valor Real"),
- ( 51, "CRC", "â‚¡", "188", "Costa Rican Colon"),
- ( 52, "CSD","Дин.","891", "Serbian Dinar"),
- ( 53, "CUP", "₱", "192", "Cuban Peso"),
- ( 54, "CVE", NULL, "132", "Cape Verde Escudo"),
- ( 55, "CYP", "£", "196", "Cyprus Pound"),
- ( 56, "CZK", "K�", "203", "Czech Koruna"),
- ( 57, "DJF", NULL, "262", "Djibouti Franc"),
- ( 58, "DKK", "kr", "208", "Danish Krone"),
- ( 59, "DOP","RD$", "214", "Dominican Peso"),
- ( 60, "DZD", NULL, "012", "Algerian Dinar"),
- ( 61, "EEK", "kr", "233", "Estonian Kroon"),
- ( 62, "EGP", "£", "818", "Egyptian Pound"),
- ( 63, "ERN", NULL, "232", "Eritrean Nakfa"),
- ( 64, "ETB", NULL, "230", "Ethiopian Birr"),
- ( 65, "FJD", "$", "242", "Fiji Dollar"),
- ( 66, "FKP", "£", "238", "Falkland Islands Pound"),
- ( 67, "GEL", NULL, "981", "Georgian Lari"),
- ( 68, "GHC", "¢", "288", "Ghanaian Cedi"),
- ( 69, "GIP", "£", "292", "Gibraltar Pound"),
- ( 70, "GMD", NULL, "270", "Gambian Dalasi"),
- ( 71, "GNF", NULL, "324", "Guinea Franc"),
- ( 72, "GTQ", "Q", "320", "Guatemalan Quetzal"),
- ( 73, "GWP", NULL, "624", "Guinea-Bissau Peso"),
- ( 74, "GYD", "$", "328", "Guyana Dollar"),
- ( 75, "HKD","HK$", "344", "Hong Kong Dollar"),
- ( 76, "HNL", "L", "340", "Honduran Lempira"),
- ( 77, "HRK", "kn", "191", "Croatian Kuna"),
- ( 78, "HTG", NULL, "332", "Haitian Gourde"),
- ( 79, "HUF", "Ft", "348", "Hungarian Forint"),
- ( 80, "IDR", "Rp", "360", "Indonesian Rupiah"),
- ( 81, "IQD", NULL, "368", "Iraqi Dinar"),
- ( 82, "IRR", "ï·¼", "364", "Iranian Rial"),
- ( 83, "ISK", "kr", "352", "Iceland Krona"),
- ( 84, "JMD", "J$", "388", "Jamaican Dollar"),
- ( 85, "JOD", NULL, "400", "Jordanian Dinar"),
- ( 86, "KES", NULL, "404", "Kenyan Shilling"),
- ( 87, "KGS", "лв", "417", "Kyrgyzstan Som"),
- ( 88, "KHR", "៛", "116", "Cambodian Riel"),
- ( 89, "KMF", NULL, "174", "Comoro Franc"),
- ( 90, "KPW", "â‚©", "408", "North Korean Won"),
- ( 91, "KWD", NULL, "414", "Kuwaiti Dinar"),
- ( 92, "KYD", "$", "136", "Cayman Islands Dollar"),
- ( 93, "KZT", "лв", "398", "Kazakhstan Tenge"),
- ( 94, "LBP", "£", "422", "Lebanese Pound"),
- ( 95, "LKR", "₨", "144", "Sri Lanka Rupee"),
- ( 96, "LRD", "$", "430", "Liberian Dollar"),
- ( 97, "LSL", NULL, "426", "Lesotho Loti"),
- ( 98, "LTL", "Lt", "440", "Lithuanian Litas"),
- ( 99, "LVL", "Ls", "428", "Latvian Lats"),
- (100, "LYD", NULL, "434", "Libyan Dinar"),
- (101, "MAD", NULL, "504", "Moroccan Dirham"),
- (102, "MDL", NULL, "498", "Moldovan Leu"),
- (103, "MGA", NULL, "969", "Malagascy Ariary"),
- (104, "MKD","ден", "807", "Macedonian Denar"),
- (105, "MMK", NULL, "104", "Myanmar Kyat"),
- (106, "MOP", NULL, "446", "Macao Pataca"),
- (107, "MRO", NULL, "478", "Mauritanian Ouguiya"),
- (108, "MTL", "Lm", "470", "Maltese Lira"),
- (109, "MUR", "₨", "480", "Mauritius Rupee"),
- (110, "MVR", NULL, "462", "Maldive Rufiyaa"),
- (111, "MWK", NULL, "454", "Malawi Kwacha"),
- (112, "MXN", "$", "484", "Mexican Peso"),
- (113, "MXV", NULL, "979", "Mexican Unidad de Inversion (UID)"),
- (114, "MYR", "RM", "458", "Malaysian Ringgit"),
- (115, "MZN", "MT", "943", "Mozambique Metical"),
- (116, "NAD", "$", "516", "Namibian Dollar"),
- (117, "NIO", "C$", "558", "Nicaraguan Cordoba Oro"),
- (118, "NOK", "kr", "578", "Norwegian Krone"),
- (119, "NPR", "₨", "524", "Nepalese Rupee"),
- (120, "NZD", "$", "554", "New Zealand Dollar"),
- (121, "OMR", "ï·¼", "512", "Rial Omani"),
- (122, "PAB","B/.", "590", "Panamanian Balboa"),
- (123, "PEN","S/.", "604", "Peruvian Nuevo Sol"),
- (124, "PGK", NULL, "598", "Papua New Guinea Kina"),
- (125, "PHP","Php", "608", "Philippine Peso"),
- (126, "PKR", "₨", "586", "Pakistan Rupee"),
- (127, "PYG", "Gs", "600", "Paraguay Guarani"),
- (128, "QAR", "ï·¼", "634", "Qatari Rial"),
- (129, "ROL", NULL, "642", "Romanian Old Leu"),
- (130, "RON","lei", "946", "Romanian New Leu"),
- (131, "RUB","руб", "643", "Russian Rouble"),
- (132, "RWF", NULL, "646", "Rwanda Franc"),
- (133, "SAR", "ï·¼", "682", "Saudi Riyal"),
- (134, "SBD", "$", "090", "Solomon Islands Dollar"),
- (135, "SCR", "₨", "690", "Seychelles Rupee"),
- (136, "SDD", NULL, "736", "Sudanese Dinar"),
- (137, "SEK", "kr", "752", "Swedish Krona"),
- (138, "SGD", "$", "702", "Singapore Dollar"),
- (139, "SHP", "£", "654", "Saint Helena Pound"),
- (140, "SIT", NULL, "705", "Slovenian Tolar"),
- (141, "SKK","SIT", "703", "Slovak Koruna"),
- (142, "SLL", NULL, "694", "Leone"),
- (143, "SOS", "S", "706", "Somali Shilling"),
- (144, "SRD", "$", "968", "Surinam Dollar"),
- (145, "STD", NULL, "678", "São Tome and Principe Dobra"),
- (146, "SVC", "$", "222", "El Salvador Colon"),
- (147, "SYP", "£", "760", "Syrian Pound"),
- (148, "SZL", NULL, "748", "Swaziland Lilangeni"),
- (149, "TJS", NULL, "972", "Tajik Somoni"),
- (150, "TMM", NULL, "795", "Turkmenistan Manat"),
- (151, "TND", NULL, "788", "Tunisian Dinar"),
- (152, "TOP", NULL, "776", "Tongan Pa'anga"),
- (153, "TRY","YTL", "949", "New Turkish Lira"),
- (154, "TTD","TT$", "780", "Trinidad and Tobago Dollar"),
- (155, "TWD","NT$", "901", "New Taiwan Dollar"),
- (156, "TZS", NULL, "834", "Tanzanian Shilling"),
- (157, "UAH", "â‚´", "980", "Ukrainian Hryvnia"),
- (158, "UGX", NULL, "800", "Ugandan Shilling"),
- (159, "USN", NULL, "997", "US Dollar (Next day)"),
- (160, "USS", NULL, "998", "US Dollar (Same day)"),
- (161, "UYU", "$U", "858", "Peso Uruguayo"),
- (162, "UZS", "лв", "860", "Uzbekistan Sum"),
- (163, "VEB", "Bs", "862", "Venezuela Bolivar"),
- (164, "VUV", NULL, "548", "Vanuatu Vatu"),
- (165, "WST", NULL, "882", "Samoan Tala"),
- (166, "XAF", NULL, "950", "CFA Franc BEAC"),
- (167, "XAG", NULL, "961", "Silver"),
- (168, "XAU", NULL, "959", "Gold"),
- (169, "XBA", NULL, "955", "Bond Markets Units European Composite Unit (EURCO)"),
- (170, "XBB", NULL, "956", "European Monetary Unit (E.M.U.-6)"),
- (171, "XBC", NULL, "957", "European Unit of Account 9 (E.U.A.-9)"),
- (172, "XBD", NULL, "958", "European Unit of Account 17 (E.U.A.-17)"),
- (173, "XCD", "$", "951", "East Caribbean Dollar"),
- (174, "XDR", NULL, "960", "Special Drawing Right"),
- (175, "XFO", NULL, NULL, "Gold-Franc"),
- (176, "XFU", NULL, NULL, "UIC-Franc"),
- (177, "XOF", NULL, "952", "CFA Franc BCEAO"),
- (178, "XPD", NULL, "964", "Palladium"),
- (179, "XPF", NULL, "953", "CFP Franc"),
- (180, "XPT", NULL, "962", "Platinum"),
- (181, "XTS", NULL, "963", "Code for testing purposes"),
- (182, "XXX", NULL, "999", "No currency involved"),
- (183, "YER", "ï·¼", "886", "Yemeni Rial"),
- (184, "ZMK", NULL, "894", "Zambian Kwacha"),
- (185, "ZWD", "Z$", "716", "Zimbabwe Dollar");
-
-
--- /*******************************************************
--- *
--- * civicrm_option_group and civicrm_option_value
--- *
--- *******************************************************/
-
- INSERT INTO `civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
- VALUES
- (@domain_id, 'group_type', 'Group Type', 0, 1);
-
-
- SELECT @option_group_id_gType := max(id) from civicrm_option_group where name = 'group_type';
-
- INSERT INTO
- civicrm_option_value (option_group_id, label, value, name, grouping, filter, is_default, weight, description, is_optgroup, is_reserved, is_active)
- VALUES
- (@option_group_id_gType, 'Access Control' , 1, NULL, NULL, 0, NULL, 1, NULL, 0, 1, 1 ),
- (@option_group_id_gType, 'Mailing List' , 2, NULL, NULL, 0, NULL, 2, NULL, 0, 1, 1 );
-
-
--- /*******************************************************
--- *
--- * civicrm_payment_processor_type (new processor plugins)
--- *
--- *******************************************************/
- INSERT INTO
- civicrm_payment_processor_type (domain_id, name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_recur_default, url_button_default, url_site_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur )
- VALUES
- (@domain_id,'PayJunction','PayJunction',NULL,1,0,'User Name','Password',NULL,NULL,'Payment_PayJunction','https://payjunction.com/quick_link',NULL,NULL,'https://payjunction.com/quick_link',NULL,NULL,1,0);
-
-
--- /*******************************************************
--- *
--- * civicrm_mailing_component
--- *
--- *******************************************************/
-
- INSERT IGNORE INTO
- civicrm_mailing_component (domain_id, name, component_type, subject, body_html, body_text, is_default, is_active)
- VALUES
- (@domain_id, 'Resubscribe Message', 'Resubscribe', 'Re-subscribe Confirmation', 'You have been re-subscribed to the following groups: {resubscribe.group}. You can un-subscribe by mailing {action.unsubscribe} or clicking {action.unsubscribeUrl}', 'You have been re-subscribed to the following groups: {resubscribe.group}. You can un-subscribe by mailing {action.unsubscribe} or clicking {action.unsubscribeUrl}', 1, 1);
-
--- /*******************************************************
--- *
--- * CRM-2349
--- *
--- *******************************************************/
- UPDATE civicrm_state_province SET name = 'Torfaen' WHERE name = 'Torfasn';
-
--- /*******************************************************
--- *
--- * fix Google Checkout URL
--- *
--- *******************************************************/
- UPDATE civicrm_payment_processor_type SET url_site_test_default = 'https://sandbox.google.com/checkout/' WHERE name = 'Google_Checkout';
-