Skip to content
Snippets Groups Projects
Commit f93705f7 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #1870 from ravishnair/CRM-13220

-- CRM-13220 fix for joomla
parents 8e9bbf87 b1f4e637
No related branches found
No related tags found
No related merge requests found
......@@ -822,6 +822,7 @@ SELECT g.*
$acls = CRM_ACL_BAO_Cache::build($contactID);
$ids = array();
if (!empty($acls)) {
$aclKeys = array_keys($acls);
$aclKeys = implode(',', $aclKeys);
......@@ -842,9 +843,7 @@ ORDER BY a.object_id
";
$params = array(1 => array($tableName, 'String'));
$dao = CRM_Core_DAO::executeQuery($query, $params);
$aclFound = FALSE;
while ($dao->fetch()) {
$aclFound = TRUE;
if ($dao->object_id) {
if (self::matchType($type, $dao->operation)) {
$ids[] = $dao->object_id;
......@@ -861,22 +860,16 @@ ORDER BY a.object_id
break;
}
}
if (!$aclFound) {
if (!empty($includedGroups) &&
is_array($includedGroups)
) {
$ids = $includedGroups;
}
else {
$ids = array();
}
}
$cache->set($cacheKey, $ids);
}
}
if (empty($ids) && !empty($includedGroups) &&
is_array($includedGroups)
) {
$ids = $includedGroups;
}
CRM_Utils_Hook::aclGroup($type, $contactID, $tableName, $allGroups, $ids);
return $ids;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment