I looked up the reason for the early return here and it was that the UI for adding other tables
in was too complex. In other words the removed lines should never be true.
However, I don't think it's the place of the query object to enforce not attempting a query the
UI struggles with. Removing this will save a later person having to figure that out
* @param array $locationSpecificFields
*/
public function __construct($ids, $contactSearch = FALSE, $locationSpecificFields = []) {
- $this->_ids = &$ids;
+ $this->_ids = $ids;
$this->_locationSpecificCustomFields = $locationSpecificFields;
$this->_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);