Skip to content
Snippets Groups Projects
Commit 00f28a27 authored by angel.h's avatar angel.h Committed by Chris Leppanen
Browse files

Issue #2500185 by angel.h, MegaChriz: Error when having an entity without base table

parent f82a9668
No related branches found
No related tags found
No related merge requests found
...@@ -167,17 +167,19 @@ function feeds_views_data() { ...@@ -167,17 +167,19 @@ function feeds_views_data() {
// Add a relationship for each entity type relating the entity's base table // Add a relationship for each entity type relating the entity's base table
// to the feeds_item table whre feeds_item.entity_type = 'entity_type'. // to the feeds_item table whre feeds_item.entity_type = 'entity_type'.
foreach (entity_get_info() as $entity_type => $info) { foreach (entity_get_info() as $entity_type => $info) {
$data['feeds_item']['table']['join'][$info['base table']] = array( if (!empty($info['base table'])) {
'left_field' => $info['entity keys']['id'], $data['feeds_item']['table']['join'][$info['base table']] = array(
'field' => 'entity_id', 'left_field' => $info['entity keys']['id'],
'type' => 'LEFT', 'field' => 'entity_id',
'extra' => array( 'type' => 'LEFT',
array( 'extra' => array(
'field' => 'entity_type', array(
'value' => $entity_type, 'field' => 'entity_type',
'value' => $entity_type,
),
), ),
), );
); }
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment