123456789101112131415161718 |
- diff --git a/views/entityreference_plugin_display.inc b/views/entityreference_plugin_display.inc
- index 1fc6450..b9a956d 100644
- --- a/views/entityreference_plugin_display.inc
- +++ b/views/entityreference_plugin_display.inc
- @@ -76,7 +76,12 @@
- foreach ($style_options['search_fields'] as $field_alias) {
- if (!empty($field_alias)) {
- // Get the table and field names for the checked field
- - $field = $this->view->query->fields[$this->view->field[$field_alias]->field_alias];
- + if (empty($this->view->field[$field_alias]->field_info))
- + $field = $this->view->query->fields[$this->view->field[$field_alias]->field_alias];
- + else {
- + $this->view->query->add_field($this->view->field[$field_alias]->options['table'], $this->view->field[$field_alias]->real_field, $this->view->field[$field_alias]->options['field'], array());
- + $field = $this->view->query->fields[$this->view->field[$field_alias]->options['field']];
- + }
- // Add an OR condition for the field
- $conditions->condition($field['table'] . '.' . $field['field'], $value, 'LIKE');
- }
|