Skip to content

Commit

Permalink
Delete navigation links to old campaign dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Sep 20, 2023
1 parent 81a0da8 commit 2011fc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CRM/Upgrade/Incremental/sql/5.67.alpha1.mysql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
8 changes: 0 additions & 8 deletions xml/templates/civicrm_navigation.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ),
Expand Down

0 comments on commit 2011fc9

Please sign in to comment.