CRM-21447: Contact Relationship Report: move variable handling to beginPostProcessCom...
authorMathieu Lutfy <mathieu@bidon.ca>
Fri, 17 Nov 2017 17:45:56 +0000 (12:45 -0500)
committerMathieu Lutfy <mathieu@bidon.ca>
Fri, 17 Nov 2017 17:45:56 +0000 (12:45 -0500)
CRM/Report/Form/Contact/Relationship.php

index 14dda235acaa74515a38a4a502c8539ecf812071..5955267d2f55b0953d4597cafd0aae568466e391 100644 (file)
@@ -646,9 +646,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
     $this->_groupBy = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($this->_selectClauses, $groupBy);
   }
 
-  public function postProcess() {
-    $this->beginPostProcess();
-
+  public function beginPostProcessCommon() {
     $originalRelationshipTypeIdValue = CRM_Utils_Array::value('relationship_type_id_value', $this->_params);
     if ($originalRelationshipTypeIdValue) {
       $relationshipTypes = array();
@@ -663,11 +661,16 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
       $this->relationType = $direction[0];
       $this->_params['relationship_type_id_value'] = $relationshipTypes;
     }
+  }
+
+  public function postProcess() {
+    $this->beginPostProcess();
 
     $this->buildACLClause(array(
       $this->_aliases['civicrm_contact'],
       $this->_aliases['civicrm_contact_b'],
     ));
+
     $sql = $this->buildQuery();
     $this->buildRows($sql, $rows);