Skip to content
Snippets Groups Projects
Commit 9c20667c authored by Dave Greenberg's avatar Dave Greenberg
Browse files

Merge pull request #330 from deepak-srivastava/new

CRM-12225
parents 24182e94 8693efdb
Branches
Tags
No related merge requests found
......@@ -69,6 +69,18 @@ class CRM_Group_Page_AJAX {
// get group list
$groups = CRM_Contact_BAO_Group::getGroupListSelector($params);
// if no groups found with parent-child hierarchy and logged in user say can view child groups only (an ACL case),
// go ahead with flat hierarchy, CRM-12225
if (empty($groups)) {
$groupsAccessible = CRM_Core_PseudoConstant::group();
$parentsOnly = CRM_Utils_Array::value('parentsOnly', $params);
if (!empty($groupsAccessible) && $parentsOnly) {
// recompute group list with flat hierarchy
$params['parentsOnly'] = 0;
$groups = CRM_Contact_BAO_Group::getGroupListSelector($params);
}
}
$iFilteredTotal = $iTotal = $params['total'];
$selectorElements = array(
'group_name', 'group_id', 'created_by', 'group_description',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment