commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / CRM / Upgrade / Incremental / sql / 3.4.1.mysql.tpl
1 -- CRM-7796
2
3 ALTER TABLE `civicrm_dashboard` ADD `fullscreen_url` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'fullscreen url for dashlet';
4
5 UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/activity&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/activity&reset=1&snippet=4';
6 UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/myCases&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/myCases&reset=1&snippet=4';
7 UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/allCases&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/allCases&reset=1&snippet=4';
8
9 -- CRM-7956
10 DELETE FROM civicrm_navigation where name = 'CiviCampaign';
11 DELETE FROM civicrm_navigation where name = 'Survey Types';
12 DELETE FROM civicrm_navigation where name = 'Campaign Types';
13 DELETE FROM civicrm_navigation where name = 'Campaign Status';
14 DELETE FROM civicrm_navigation where name = 'Engagement Index';
15
16 SELECT @administerID := MAX(id) FROM civicrm_navigation where name = 'Administer';
17 SELECT @adminCampaignWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @administerID;
18
19 INSERT INTO civicrm_navigation
20 ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
21 VALUES
22 ( {$domainID}, NULL, '{ts escape="sql" skip="true"}CiviCampaign{/ts}', 'CiviCampaign', 'administer CiviCampaign,administer CiviCRM', 'AND', @administerID, '1', NULL, @adminCampaignWeight );
23
24 SET @adminCampaignID:=LAST_INSERT_ID();
25
26 INSERT INTO civicrm_navigation
27 ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
28 VALUES
29 ( {$domainID}, 'civicrm/admin/campaign/surveyType&reset=1', '{ts escape="sql" skip="true"}Survey Types{/ts}', 'Survey Types', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 1 ),
30 ( {$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 ),
31 ( {$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 ),
32 ( {$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 );
33
34 -- CRM-7976
35 DELETE FROM civicrm_navigation where name = 'Manage CiviCRM Extensions';
36
37 SELECT @customizeID := MAX(id) FROM civicrm_navigation where name = 'Customize';
38 SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @customizeID;
39
40 INSERT INTO civicrm_navigation
41 ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
42 VALUES
43 ( {$domainID}, 'civicrm/admin/extensions&reset=1', '{ts escape="sql" skip="true"}Manage CiviCRM Extensions{/ts}', 'Manage CiviCRM Extensions', 'administer CiviCRM', '', @customizeID, '1', NULL, @extensionsWeight );
44
45 -- CRM-7878
46 -- insert drupal wysiwyg editor option
47 SELECT @option_group_id_we := max(id) from civicrm_option_group where name = 'wysiwyg_editor';
48
49 INSERT INTO civicrm_option_value
50 ( 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 )
51 VALUES
52 ( @option_group_id_we, {localize}'Drupal Default Editor'{/localize}, 4, NULL, NULL, 0, NULL, 4, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL );
53
54 -- CRM-7988 allow negative start and end date offsets for custom fields
55 ALTER TABLE civicrm_custom_field MODIFY start_date_years INT(10);
56 ALTER TABLE civicrm_custom_field MODIFY end_date_years INT(10);
57
58 -- CRM-8009
59 INSERT IGNORE INTO civicrm_state_province
60 (`name`, `abbreviation`, `country_id` )
61 VALUES
62 ( 'Toledo' , 'TO', '1198' ),
63 ( 'Córdoba', 'CO', '1198' );