Delete navigation links to old campaign dashboard
authorcolemanw <coleman@civicrm.org>
Sun, 3 Sep 2023 21:17:59 +0000 (17:17 -0400)
committercolemanw <coleman@civicrm.org>
Fri, 22 Sep 2023 23:52:42 +0000 (19:52 -0400)
CRM/Upgrade/Incremental/sql/5.67.alpha1.mysql.tpl
xml/templates/civicrm_navigation.tpl

index 4b47ee98b060feaef8877cd94576b6cc2b050e2a..54afcfc924a4937637331b6fdcaf1a087a92fc73 100644 (file)
@@ -5,7 +5,9 @@ UPDATE civicrm_note SET privacy = 0 WHERE privacy IS NULL;
 {* 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;
index 33f02e768abde5d2d687ae5872043a1ff8ec3be3..f3428eeb3e9c66fd18b3d144f228ab14f4fe3e61 100644 (file)
@@ -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 ),