Commit 850930db authored by mattwire's avatar mattwire
Browse files

Fixes to group admin menu

parent 080a842b
...@@ -64,7 +64,7 @@ class CRM_Groupadmin_BAO_GroupAdminContact extends CRM_Groupadmin_DAO_GroupAdmin ...@@ -64,7 +64,7 @@ class CRM_Groupadmin_BAO_GroupAdminContact extends CRM_Groupadmin_DAO_GroupAdmin
'contact_id' => CRM_Core_Session::getLoggedInContactID(), 'contact_id' => CRM_Core_Session::getLoggedInContactID(),
'group_id' => $groupID, 'group_id' => $groupID,
]); ]);
return ((bool) $groups['count']) ?? FALSE; return (!empty($groups));
} }
} }
...@@ -209,14 +209,12 @@ function groupadmin_civicrm_navigationMenu(&$menu) { ...@@ -209,14 +209,12 @@ function groupadmin_civicrm_navigationMenu(&$menu) {
'separator' => 0, 'separator' => 0,
]); ]);
_groupadmin_civix_navigationMenu($menu); _groupadmin_civix_navigationMenu($menu);
CRM_Groupadmin_NavigationMenu::createOrUpdateGroupAdminMenu();
} }
function groupadmin_civicrm_buildForm($formName, &$form) { function groupadmin_civicrm_buildForm($formName, &$form) {
if ($formName !== 'CRM_Admin_Form_Generic') { CRM_Groupadmin_NavigationMenu::createOrUpdateGroupAdminMenu();
return; }
}
if ($form->isSubmitted()) { function groupadmin_civicrm_pageRun(&$page) {
CRM_Groupadmin_NavigationMenu::createOrUpdateGroupAdminMenu(); CRM_Groupadmin_NavigationMenu::createOrUpdateGroupAdminMenu();
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment