Skip to content

Commit

Permalink
Merge pull request #19104 from MegaphoneJon/export-fix
Browse files Browse the repository at this point in the history
Unable to export contacts in Civi 5.32+
  • Loading branch information
eileenmcnaughton authored Dec 4, 2020
2 parents d13a7fc + 0257e9a commit 220b62a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Export/BAO/ExportProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ public function runQuery($params, $order) {
list($select, $from, $where, $having) = $query->query();
$this->setQueryFields($query->_fields);
$whereClauses = ['trash_clause' => "contact_a.is_deleted != 1"];
if ($this->getRequestedFields() && ($this->getComponentTable())) {
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()) {
Expand Down

0 comments on commit 220b62a

Please sign in to comment.