| 1 | |
| 2 | {* file to handle db changes in 4.6.6 during upgrade *} |
| 3 | |
| 4 | -- CRM-16846 - This upgrade may have been previously skipped so moving it to 4.6.6 |
| 5 | -- update permission for editing message templates (CRM-15819) |
| 6 | |
| 7 | SELECT @messages_menu_id := id FROM civicrm_navigation WHERE name = 'Mailings'; |
| 8 | |
| 9 | UPDATE `civicrm_navigation` |
| 10 | SET `permission` = 'edit message templates' |
| 11 | WHERE `parent_id` = @messages_menu_id |
| 12 | AND name = 'Message Templates'; |
| 13 | |
| 14 | -- CRM-16907 |
| 15 | SELECT @adminHelplastID := id FROM civicrm_navigation WHERE name = 'Help'; |
| 16 | UPDATE civicrm_navigation |
| 17 | SET name = 'Support', label = 'Support' |
| 18 | WHERE id = @adminHelplastID; |
| 19 | |
| 20 | DELETE FROM civicrm_navigation where parent_id = @adminHelplastID; |
| 21 | |
| 22 | INSERT INTO civicrm_navigation |
| 23 | ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) |
| 24 | VALUES |
| 25 | ( {$domainID}, 'http://civicrm.org/get-started?src=iam', '{ts escape="sql" skip="true"}Get started{/ts}', 'Get started', NULL, 'AND', @adminHelplastID, '1', NULL, 1 ), |
| 26 | ( {$domainID}, 'http://civicrm.org/documentation?src=iam', '{ts escape="sql" skip="true"}Documentation{/ts}', 'Documentation', NULL, 'AND', @adminHelplastID, '1', NULL, 2 ), |
| 27 | ( {$domainID}, 'http://civicrm.org/ask-a-question?src=iam', '{ts escape="sql" skip="true"}Ask a question{/ts}', 'Ask a question', NULL, 'AND', @adminHelplastID, '1', NULL, 3 ), |
| 28 | ( {$domainID}, 'http://civicrm.org/experts?src=iam', '{ts escape="sql" skip="true"}Get expert help{/ts}', 'Get expert help', NULL, 'AND', @adminHelplastID, '1', NULL, 4 ), |
| 29 | ( {$domainID}, 'http://civicrm.org/about?src=iam', '{ts escape="sql" skip="true"}About CiviCRM{/ts}', 'About CiviCRM', NULL, 'AND', @adminHelplastID, '1', 1, 5 ), |
| 30 | ( {$domainID}, 'http://civicrm.org/register-your-site?src=iam', '{ts escape="sql" skip="true"}Register your site{/ts}', 'Register your site', NULL, 'AND', @adminHelplastID, '1', NULL, 6 ), |
| 31 | ( {$domainID}, 'http://civicrm.org/become-member?src=iam', '{ts escape="sql" skip="true"}Join CiviCRM{/ts}', 'Join CiviCRM', NULL, 'AND', @adminHelplastID, '1', NULL, 7 ); |
| 32 | |
| 33 | INSERT INTO civicrm_navigation |
| 34 | ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) |
| 35 | VALUES |
| 36 | ( {$domainID}, NULL, '{ts escape="sql" skip="true"}Developer{/ts}', 'Developer', 'administer CiviCRM', '', @adminHelplastID, '1', 1, 8 ); |
| 37 | |
| 38 | SET @devellastID:=LAST_INSERT_ID(); |
| 39 | INSERT INTO civicrm_navigation |
| 40 | ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) |
| 41 | VALUES |
| 42 | ( {$domainID}, 'civicrm/api', '{ts escape="sql" skip="true"}API Explorer{/ts}','API Explorer', 'administer CiviCRM', '', @devellastID, '1', NULL, 1 ), |
| 43 | ( {$domainID}, 'http://civicrm.org/developer-documentation?src=iam', '{ts escape="sql" skip="true"}Developer Docs{/ts}', 'Developer Docs', 'administer CiviCRM', '', @devellastID, '1', NULL, 3 ); |
| 44 | |