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

fixes for CRM-13220

----------------------------------------
* CRM-13220: Events listing ( html ) is broken
  http://issues.civicrm.org/jira/browse/CRM-13220
parent 9f0f552c
Branches
Tags
No related merge requests found
......@@ -822,15 +822,6 @@ SELECT g.*
$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);
......@@ -851,7 +842,9 @@ 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;
......@@ -868,6 +861,18 @@ ORDER BY a.object_id
break;
}
}
if (!$aclFound) {
if (!empty($includedGroups) &&
is_array($includedGroups)
) {
$ids = $includedGroups;
}
else {
$ids = array();
}
}
$cache->set($cacheKey, $ids);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment