Revision 56aebcb7
Added by Assos Assos about 8 years ago
drupal7/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php | ||
---|---|---|
339 | 339 |
// Join the known base-table. |
340 | 340 |
$target_type = $this->field['settings']['target_type']; |
341 | 341 |
$entity_info = entity_get_info($target_type); |
342 |
$target_type_base_table = $entity_info['base table']; |
|
342 | 343 |
$id = $entity_info['entity keys']['id']; |
344 |
|
|
343 | 345 |
// Return the alias of the table. |
344 |
return $query->innerJoin($target_type, NULL, "%alias.$id = $alias.entity_id"); |
|
346 |
return $query->innerJoin($target_type_base_table, NULL, "%alias.$id = $alias.entity_id");
|
|
345 | 347 |
} |
346 | 348 |
} |
347 | 349 |
|
... | ... | |
543 | 545 |
if ($vocabulary = taxonomy_vocabulary_machine_name_load($bundle)) { |
544 | 546 |
if ($terms = taxonomy_get_tree($vocabulary->vid, 0, NULL, TRUE)) { |
545 | 547 |
foreach ($terms as $term) { |
546 |
$options[$vocabulary->machine_name][$term->tid] = str_repeat('-', $term->depth) . check_plain($term->name);
|
|
548 |
$options[$vocabulary->machine_name][$term->tid] = str_repeat('-', $term->depth) . check_plain(entity_label('taxonomy_term', $term));
|
|
547 | 549 |
} |
548 | 550 |
} |
549 | 551 |
} |
Also available in: Unified diff
Weekly update of contrib modules