$acls = CRM_ACL_BAO_Cache::build($contactID);
- if (!empty($includedGroups) &&
- is_array($includedGroups)
- ) {
- $ids = $includedGroups;
- }
- else {
- $ids = array();
- }
-
if (!empty($acls)) {
$aclKeys = array_keys($acls);
$aclKeys = implode(',', $aclKeys);
";
$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;
break;
}
}
+
+ if (!$aclFound) {
+ if (!empty($includedGroups) &&
+ is_array($includedGroups)
+ ) {
+ $ids = $includedGroups;
+ }
+ else {
+ $ids = array();
+ }
+ }
+
$cache->set($cacheKey, $ids);
}
}