From c6f4d60c17aaf02f4c2b15a12cb2555f2f3bc2f8 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 30 Apr 2020 14:17:00 +1200 Subject: [PATCH] [REF] stop overriding postProcess function in activity report detail The function is the same as master except one extra thing that can be done in the function intended for report-specific preProcess overrides --- CRM/Report/Form/Activity.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/CRM/Report/Form/Activity.php b/CRM/Report/Form/Activity.php index ed95a7722c..c2ae2beae8 100644 --- a/CRM/Report/Form/Activity.php +++ b/CRM/Report/Form/Activity.php @@ -832,24 +832,13 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}"; return $sql; } - public function postProcess() { - //reset value of activity_date + /** + * Override parent to reset value of activity_date. + */ + public function beginPostProcessCommon() { if (!empty($this->_resetDateFilter)) { - $this->_formValues["activity_date_time_relative"] = NULL; + $this->_formValues['activity_date_time_relative'] = NULL; } - - $this->beginPostProcess(); - $sql = $this->buildQuery(TRUE); - $this->buildRows($sql, $rows); - - // format result set. - $this->formatDisplay($rows); - - // assign variables to templates - $this->doTemplateAssignment($rows); - - // do print / pdf / instance stuff if needed - $this->endPostProcess($rows); } /** @@ -860,6 +849,8 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}"; * * @param array $rows * Rows generated by SQL, with an array for each row. + * + * @throws \CRM_Core_Exception */ public function alterDisplay(&$rows) { $entryFound = FALSE; -- 2.25.1