CRM-20242 - Add developer Tab to Activity Detail report
authoreileen <emcnaughton@wikimedia.org>
Sat, 11 Mar 2017 03:27:12 +0000 (16:27 +1300)
committereileen <emcnaughton@wikimedia.org>
Sat, 11 Mar 2017 03:27:12 +0000 (16:27 +1300)
CRM/Report/Form.php
CRM/Report/Form/Activity.php

index 8fbc9c05849bc86877fe93d067c9c2d798a74b58..0e2c28a008b085fcbfa30b53b851700fcf86390c 100644 (file)
@@ -2290,6 +2290,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
       if (array_key_exists('fields', $table)) {
         foreach ($table['fields'] as $fieldName => $field) {
           if ($tableName == 'civicrm_address') {
+            // deprecated, use $this->isTableSelected.
             $this->_addressField = TRUE;
           }
           if ($tableName == 'civicrm_email') {
index 820b6f6d1e38a63ba701a2d5a2e2503c7671a2d5..d29492086468e2072511ca4a009f8763e5c31b5d 100644 (file)
@@ -727,7 +727,7 @@ FROM civireport_activity_temp_target tar
 GROUP BY civicrm_activity_id $having {$this->_orderBy}";
     $select = 'AS addtogroup_contact_id';
     $query = str_ireplace('AS civicrm_contact_contact_target_id', $select, $query);
-    $dao = CRM_Core_DAO::executeQuery($query);
+    $dao = $this->executeReportQuery($query);
 
     $contactIDs = array();
     // Add resulting contacts to group
@@ -804,7 +804,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}";
     $insertCols = implode(',', $this->_selectAliases);
     $tempQuery = "CREATE TEMPORARY TABLE civireport_activity_temp_target {$this->_databaseAttributes} AS
 {$this->_select} {$this->_from} {$this->_where} ";
-    CRM_Core_DAO::executeQuery($tempQuery);
+    $this->executeReportQuery($tempQuery);
 
     // 2. add new columns to hold assignee and source results
     // fixme: add when required
@@ -819,7 +819,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}";
   ADD COLUMN civicrm_phone_contact_source_phone VARCHAR(128),
   ADD COLUMN civicrm_email_contact_assignee_email VARCHAR(128),
   ADD COLUMN civicrm_email_contact_source_email VARCHAR(128)";
-    CRM_Core_DAO::executeQuery($tempQuery);
+    $this->executeReportQuery($tempQuery);
 
     // 3. fill temp table with assignee results
     $this->buildACLClause(array('civicrm_contact_assignee'));
@@ -831,7 +831,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}";
     $tempQuery = "INSERT INTO civireport_activity_temp_target ({$insertCols})
 {$this->_select}
 {$this->_from} {$this->_where}";
-    CRM_Core_DAO::executeQuery($tempQuery);
+    $this->executeReportQuery($tempQuery);
 
     // 4. fill temp table with source results
     $this->buildACLClause(array('civicrm_contact_source'));
@@ -843,7 +843,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}";
     $tempQuery = "INSERT INTO civireport_activity_temp_target ({$insertCols})
 {$this->_select}
 {$this->_from} {$this->_where}";
-    CRM_Core_DAO::executeQuery($tempQuery);
+    $this->executeReportQuery($tempQuery);
 
     // 5. show final result set from temp table
     $rows = array();
@@ -1079,7 +1079,7 @@ FROM civireport_activity_temp_target tar
 
       // initialize array of total counts
       $totals = array();
-      $dao = CRM_Core_DAO::executeQuery($query);
+      $dao = $this->executeReportQuery($query);
       while ($dao->fetch()) {
         // let $this->_alterDisplay translate any integer ids to human-readable values.
         $rows[0] = $dao->toArray();