[REF] Remove redundant call to build permissions
authoreileen <emcnaughton@wikimedia.org>
Fri, 20 Mar 2020 04:00:32 +0000 (17:00 +1300)
committereileen <emcnaughton@wikimedia.org>
Fri, 20 Mar 2020 04:00:32 +0000 (17:00 +1300)
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
CRM/Report/Form/Contribute/Summary.php

index aa285498900e681eff979f31abae4df21f9333d8..10b0778c7befb7a7ef35e8baee991659e86936b4 100644 (file)
@@ -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') {
index 35df8417748e0821686b814e75ece6f8bf264a75..04e7bfdd4471efe133da42470eca2b2306487f6c 100644 (file)
@@ -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.
    *