Skip to content

Commit

Permalink
Merge pull request #15718 from eileenmcnaughton/custom_query_fix
Browse files Browse the repository at this point in the history
[REF] Remove early return on joinTable
  • Loading branch information
seamuslee001 authored Nov 4, 2019
2 parents 1a18739 + 688e7a0 commit b8725d6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions CRM/Core/BAO/CustomQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function getFields() {
* @param array $locationSpecificFields
*/
public function __construct($ids, $contactSearch = FALSE, $locationSpecificFields = []) {
$this->_ids = &$ids;
$this->_ids = $ids;
$this->_locationSpecificCustomFields = $locationSpecificFields;

$this->_select = [];
Expand Down Expand Up @@ -222,10 +222,6 @@ public function select() {
$this->_select[$fieldName] = "{$field['table_name']}.{$field['column_name']} as $fieldName";
$this->_element[$fieldName] = 1;
$joinTable = $field['search_table'];
// CRM-14265
if ($joinTable == 'civicrm_group' || empty($joinTable)) {
return;
}

$this->joinCustomTableForField($field);

Expand Down

0 comments on commit b8725d6

Please sign in to comment.