fix navigation menu ordering
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 18 Apr 2016 06:58:53 +0000 (12:28 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 18 Apr 2016 06:58:53 +0000 (12:28 +0530)
CRM/Upgrade/Incremental/sql/4.7.7.mysql.tpl

index 4993ac8315dff8f7fdcfd07332e5455b31146e35..a6430c44a570a4c929c373d8921e75e750d08f4e 100644 (file)
@@ -1 +1,14 @@
 {* file to handle db changes in 4.7.7 during upgrade *}
+-- Fix weight interchange of `Extensions` and `Connections` navigation menu
+SELECT @parent_id := id from `civicrm_navigation` where name = 'System Settings' AND domain_id = {$domainID};
+UPDATE
+  `civicrm_navigation` AS nav1
+  JOIN `civicrm_navigation` AS nav2 ON
+  nav1.name = 'Connections'
+  AND nav2.name = 'Manage Extensions'
+  AND nav2.has_separator = 1
+  AND nav1.parent_id = @parent_id
+  AND nav1.weight > nav2.weight
+SET
+  nav1.weight = nav2.weight,
+  nav2.weight = nav1.weight;