From 4f490fbf834e11e71ee24dee79c919c6b3eb05fd Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 17 Jun 2015 18:59:33 +0530 Subject: [PATCH] CRM-12675 : cleanup - Contribution activities shown to users without permission https://issues.civicrm.org/jira/browse/CRM-12675 --- CRM/Activity/Form/Task.php | 3 ++- CRM/Activity/Selector/Search.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Activity/Form/Task.php b/CRM/Activity/Form/Task.php index 0ce725dcae..64aa3fa841 100644 --- a/CRM/Activity/Form/Task.php +++ b/CRM/Activity/Form/Task.php @@ -118,9 +118,10 @@ class CRM_Activity_Form_Task extends CRM_Core_Form { $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)) { diff --git a/CRM/Activity/Selector/Search.php b/CRM/Activity/Selector/Search.php index 59d6d8b31d..090ed4b0eb 100644 --- a/CRM/Activity/Selector/Search.php +++ b/CRM/Activity/Selector/Search.php @@ -175,6 +175,7 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM // 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}) "; -- 2.25.1