From 89af34203f42d22bdfc752df9a02c50b28ca6933 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 20 Mar 2020 17:00:32 +1300 Subject: [PATCH] [REF] Remove redundant call to build permissions Per the comments I added to the function the output of this permissions clause is overwritten. I stepped through this in the process of reviewing the datepicker PR & confirmed it --- CRM/Report/Form.php | 3 +++ CRM/Report/Form/Contribute/Summary.php | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index aa28549890..10b0778c7b 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -3876,6 +3876,9 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND * Buld contact acl clause * @deprecated in favor of buildPermissionClause * + * Note that if the buildPermissionClause function is called (which most reports do from + * buildQuery then the results of this function are re-calculated and overwritten. + * * @param string $tableAlias */ public function buildACLClause($tableAlias = 'contact_a') { diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index 35df841774..04e7bfdd44 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -741,14 +741,6 @@ ROUND(AVG({$this->_aliases['civicrm_contribution_soft']}.amount), 2) as civicrm_ return $statistics; } - /** - * Post process function. - */ - public function postProcess() { - $this->buildACLClause($this->_aliases['civicrm_contact']); - parent::postProcess(); - } - /** * Build chart. * -- 2.25.1