diff --git a/entityreference.module b/entityreference.module index 584ade35..04ce0a61 100644 --- a/entityreference.module +++ b/entityreference.module @@ -804,8 +804,8 @@ function entityreference_field_widget_settings_form($field, $instance) { ); $form['hide_ids'] = array( '#type' => 'checkbox', - '#title' => t('Hide ids'), - '#description' => t('If your target entities have unique labels you may choose not to have the ids shown to the user. Note that this setting will make it impossible to reference entities with non-unique labels!'), + '#title' => t('Hide IDs'), + '#description' => t('If your target entities have unique labels you may choose not to have the IDs shown to the user. Note that this setting will make it impossible to reference entities with non-unique labels!'), '#default_value' => $settings['hide_ids'], ); } @@ -1131,7 +1131,7 @@ function entityreference_autocomplete_callback_get_matches($type, $field, $insta if (strpos($key, ',') !== FALSE || strpos($key, '"') !== FALSE) { $key = '"' . str_replace('"', '""', $key) . '"'; } - $matches[$prefix . $key] = '
' . $key . '
'; + $matches[$prefix . $key] = '
' . $label . '
'; } } } diff --git a/views/entityreference_plugin_display.inc b/views/entityreference_plugin_display.inc index 88ba8d85..cca36509 100644 --- a/views/entityreference_plugin_display.inc +++ b/views/entityreference_plugin_display.inc @@ -73,7 +73,6 @@ class entityreference_plugin_display extends views_plugin_display { $conditions = db_or(); // Build the condition using the selected search fields - $fields = array(); foreach ($style_options['search_fields'] as $field_alias) { if (!empty($field_alias)) { @@ -88,11 +87,9 @@ class entityreference_plugin_display extends views_plugin_display { } // Add an OR condition for the field $conditions->condition($field['table'] . '.' . $field['field'], $value, 'LIKE'); - $fields[] = $field['table'] . '.' . $field['field']; } } - $conditions->where("CONCAT(" . implode(", ' - ', ", $fields) . ") LIKE :value ESCAPE '\\\\'", array(':value' => $value)); $this->view->query->add_where(NULL, $conditions); }