summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5458ce2)
This fixes regression caused by us more consistently setting componentTable.
The short version here is that the presence of a componentClause should take precedences
over the inner join intended as a blunt, and maybe unnecessary, measure to
limit the export to the entity in question
list($select, $from, $where, $having) = $query->query();
$this->setQueryFields($query->_fields);
$whereClauses = ['trash_clause' => "contact_a.is_deleted != 1"];
list($select, $from, $where, $having) = $query->query();
$this->setQueryFields($query->_fields);
$whereClauses = ['trash_clause' => "contact_a.is_deleted != 1"];
- if ($this->getRequestedFields() && $this->getComponentTable() && $this->getComponentTable() !== 'civicrm_contact') {
- $from .= " INNER JOIN " . $this->getComponentTable() . " ctTable ON ctTable.contact_id = contact_a.id ";
- }
- elseif ($this->getComponentClause()) {
+ if ($this->getComponentClause()) {
$whereClauses[] = $this->getComponentClause();
}
$whereClauses[] = $this->getComponentClause();
}
+ elseif ($this->getRequestedFields() && $this->getComponentTable() && $this->getComponentTable() !== 'civicrm_contact') {
+ $from .= " INNER JOIN " . $this->getComponentTable() . " ctTable ON ctTable.contact_id = contact_a.id ";
+ }
// CRM-13982 - check if is deleted
foreach ($params as $value) {
// CRM-13982 - check if is deleted
foreach ($params as $value) {