$this->customDataFrom();
$this->groupBy();
+ $sql = NULL;
$rows = array();
// build array of result based on column headers. This method also allows
// modifying column headers before using it to build result set i.e $rows.
- $this->buildRows($rows);
+ $this->buildRows($sql, $rows);
// format result set.
$this->formatDisplay($rows, FALSE);
/**
* @param $rows
*/
- function buildRows(&$rows) {
+ function buildRows($sql, &$rows) {
$contactIds = array();
$addWhere = '';
//hack filter display for relationship type
$type = substr($this->_params['relationship_type_id_value'], -3);
foreach ($statistics['filters'] as $id => $value) {
- if ($value['title'] == 'Relationship Type') {
+ if ($value['title'] == 'Relationship Type' && !empty($id)) {
$statistics['filters'][$id]['value'] = 'Is equal to ' . $this->relationTypes[$this->relationshipId . '_' . $type];
}
}
$this->relationTypes = $relationTypes = array();
$params = array('contact_type_b' => 'Organization', 'version' => 3);
- $typesA = &civicrm_api('relationship_type', 'get', $params);
+ $typesA = civicrm_api('relationship_type', 'get', $params);
if (empty($typesA['is_error'])) {
foreach ($typesA['values'] as $rel) {
}
$params = array('contact_type_a' => 'Organization', 'version' => 3);
- $typesB = &civicrm_api('relationship_type', 'get', $params);
+ $typesB = civicrm_api('relationship_type', 'get', $params);
if (empty($typesB['is_error'])) {
foreach ($typesB['values'] as $rel) {