https://issues.civicrm.org/jira/browse/CRM-12675
$activityClause = NULL;
$components = CRM_Core_Component::getNames();
+ $componentClause = array();
foreach ($components as $componentID => $componentName) {
if (!CRM_Core_Permission::check("access $componentName")) {
- $componentClause = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";
+ $componentClause[] = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";
}
}
if (!empty($componentClause)) {
// CRM-12675
$components = CRM_Core_Component::getNames();
+ $componentClause = array();
foreach ($components as $componentID => $componentName) {
if (!CRM_Core_Permission::check("access $componentName")) {
$componentClause[] = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";