Skip to content

Commit

Permalink
only include the tables that will be in from clause
Browse files Browse the repository at this point in the history
  • Loading branch information
pradpnayak committed Sep 13, 2018
1 parent ed0775f commit f61375a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CRM/Report/Form/Contact/Detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ public function from() {
$this->joinPhoneFromContact();
$this->joinEmailFromContact();

// only include tables that are in from clause
$componentTables = array_intersect($this->_aliases, $this->_component);
$componentTables = array_flip($componentTables);
$this->_selectedTables = array_diff($this->_selectedTables, $componentTables);

if (!empty($this->_selectComponent['contribution_civireport'])) {
$this->_formComponent['contribution_civireport'] = " FROM
civicrm_contact {$this->_aliases['civicrm_contact']}
Expand Down

0 comments on commit f61375a

Please sign in to comment.