+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
CRM_Core_Error::fatal(ts('Current filter criteria didn\'t have any target contact to add to group'));
}
- $query = "{$this->_select}
+ $new_select = 'AS addtogroup_contact_id';
+ $select = str_ireplace('AS civicrm_contact_contact_target_id', $new_select, $this->_select);
+ $new_having = ' addtogroup_contact_id';
+ $having = str_ireplace(' civicrm_contact_contact_target_id', $new_having, $this->_having);
+ $query = "$select
FROM civireport_activity_temp_target tar
-GROUP BY civicrm_activity_id {$this->_having} {$this->_orderBy}";
+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);
}
}
- if (array_key_exists('civicrm_activity_details', $row)) {
+ if (array_key_exists('civicrm_activity_details', $row) && $this->_outputMode == 'html') {
if ($value = $row['civicrm_activity_details']) {
$fullDetails = $rows[$rowNum]['civicrm_activity_details'];
$rows[$rowNum]['civicrm_activity_details'] = substr($fullDetails, 0, strrpos(substr($fullDetails, 0, 80), ' '));