From 761b9c8efb969f8009a204071209ff6129d83073 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Mon, 21 Sep 2015 17:18:37 +0530 Subject: [PATCH] CRM-16526, more changes to the code ---------------------------------------- * CRM-16526: ACLs for Financial Types https://issues.civicrm.org/jira/browse/CRM-16526 --- CRM/Financial/BAO/FinancialType.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Financial/BAO/FinancialType.php b/CRM/Financial/BAO/FinancialType.php index 8b48baf6a3..fe27691b4b 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -348,14 +348,17 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { $column = "financial_type_id"; } if ($component == 'membership') { - self::getAvailableMembershipTypes($types, 'view'); + self::getAvailableMembershipTypes($types, CRM_Core_Action::VIEW); $column = "membership_type_id"; } + if (!empty($whereClauses)) { + $whereClauses = ' AND '; + } if (empty($types)) { - $whereClauses .= " AND civicrm_{$component}.{$column} IN (0)"; + $whereClauses .= " civicrm_{$component}.{$column} IN (0)"; return; } - $whereClauses .= " AND civicrm_{$component}.{$column} IN (" . implode(',', array_keys($types)) . ")"; + $whereClauses .= " civicrm_{$component}.{$column} IN (" . implode(',', array_keys($types)) . ")"; } } -- 2.25.1