[REF] stop overriding postProcess function in activity report detail
authoreileen <emcnaughton@wikimedia.org>
Thu, 30 Apr 2020 02:17:00 +0000 (14:17 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 30 Apr 2020 02:31:28 +0000 (14:31 +1200)
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

index ed95a7722c04f9f21def9d64a83d8ebd63a787e4..c2ae2beae8402a0385f624e1179b3e3f6d4f13f3 100644 (file)
@@ -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;