From: Dave Greenberg Date: Tue, 30 Jun 2015 15:01:19 +0000 (-0700) Subject: Merge pull request #5839 from seamuslee001/CRM-9764-4-6 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fd57b1d3afbbe9b63a82a0864728b79f94d3f4e1;p=civicrm-core.git Merge pull request #5839 from seamuslee001/CRM-9764-4-6 CRM-9764 Ensure all custom searches have ACL - Backport to 4.6 --- fd57b1d3afbbe9b63a82a0864728b79f94d3f4e1 diff --cc CRM/Contact/Form/Search/Custom/ContributionAggregate.php index eb4ed36ca5,61bca05a6f..ed46a04fb2 --- a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php +++ b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php @@@ -222,9 -228,12 +227,12 @@@ civicrm_contact AS contact_a {$this->_a } if (!empty($this->_formValues['financial_type_id'])) { - $financial_type_ids = implode(',', array_keys($this->_formValues['financial_type_id'])); + $financial_type_ids = implode(',', array_values($this->_formValues['financial_type_id'])); $clauses[] = "contrib.financial_type_id IN ($financial_type_ids)"; } + if ($this->_aclWhere) { + $clauses[] = " {$this->_aclWhere} "; + } return implode(' AND ', $clauses); }