From 2011fc91c9790009903a3a851d5ed2cce20435ed Mon Sep 17 00:00:00 2001 From: colemanw Date: Sun, 3 Sep 2023 17:17:59 -0400 Subject: [PATCH] Delete navigation links to old campaign dashboard --- CRM/Upgrade/Incremental/sql/5.67.alpha1.mysql.tpl | 4 +++- xml/templates/civicrm_navigation.tpl | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/5.67.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.67.alpha1.mysql.tpl index 53f89523f4fc..b05fa9fe28ba 100644 --- a/CRM/Upgrade/Incremental/sql/5.67.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.67.alpha1.mysql.tpl @@ -3,7 +3,9 @@ {* NULL values would be nonsensical and useless - no reason to keep them *} DELETE FROM civicrm_entity_file WHERE entity_table IS NULL; -SELECT @country_id := id from civicrm_country where name = 'India' AND iso_code = 'IN'; +{* Delete navigation links to old campaign dashboard *} +DELETE FROM `civicrm_navigation` WHERE `url` LIKE 'civicrm/campaign?reset=1%'; +SELECT @country_id := id from civicrm_country where name = 'India' AND iso_code = 'IN'; UPDATE `civicrm_state_province` SET abbreviation = 'MH' WHERE name = 'Maharashtra' AND country_id = @country_id; UPDATE `civicrm_state_province` SET abbreviation = 'CG' WHERE name = 'Chhattisgarh' AND country_id = @country_id; diff --git a/xml/templates/civicrm_navigation.tpl b/xml/templates/civicrm_navigation.tpl index 33f02e768abd..f3428eeb3e9c 100644 --- a/xml/templates/civicrm_navigation.tpl +++ b/xml/templates/civicrm_navigation.tpl @@ -211,14 +211,6 @@ SET @campaignlastID:=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', '{ts escape="sql" skip="true"}Dashboard{/ts}', 'Dashboard', 'manage campaign,administer CiviCampaign', 'OR', @campaignlastID, '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" skip="true"}Surveys{/ts}', 'Survey Dashboard', 'manage campaign,administer CiviCampaign', 'OR', @campaigndashboardlastID, '1', NULL, 1 ), - ( @domainID, 'civicrm/campaign?reset=1&subPage=petition', '{ts escape="sql" skip="true"}Petitions{/ts}', 'Petition Dashboard', 'manage campaign,administer CiviCampaign', 'OR', @campaigndashboardlastID, '1', NULL, 2 ), - ( @domainID, 'civicrm/campaign?reset=1&subPage=campaign', '{ts escape="sql" skip="true"}Campaigns{/ts}', 'Campaign Dashboard', 'manage campaign,administer CiviCampaign', 'OR', @campaigndashboardlastID, '1', NULL, 3 ), ( @domainID, 'civicrm/campaign/add?reset=1', '{ts escape="sql" skip="true"}New Campaign{/ts}', 'New Campaign', 'manage campaign,administer CiviCampaign', 'OR', @campaignlastID, '1', NULL, 2 ), ( @domainID, 'civicrm/survey/add?reset=1', '{ts escape="sql" skip="true"}New Survey{/ts}', 'New Survey', 'manage campaign,administer CiviCampaign', 'OR', @campaignlastID, '1', NULL, 3 ), ( @domainID, 'civicrm/petition/add?reset=1', '{ts escape="sql" skip="true"}New Petition{/ts}', 'New Petition', 'manage campaign,administer CiviCampaign', 'OR', @campaignlastID, '1', NULL, 4 ),