From: yashodha Date: Wed, 17 Jun 2015 13:29:33 +0000 (+0530) Subject: CRM-12675 : cleanup - Contribution activities shown to users without permission X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f490fbf834e11e71ee24dee79c919c6b3eb05fd;p=civicrm-core.git CRM-12675 : cleanup - Contribution activities shown to users without permission https://issues.civicrm.org/jira/browse/CRM-12675 --- 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}) ";