X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fentityqueue%2Fsrc%2FPlugin%2Fviews%2Frelationship%2FEntityQueueRelationship.php;fp=web%2Fmodules%2Fcontrib%2Fentityqueue%2Fsrc%2FPlugin%2Fviews%2Frelationship%2FEntityQueueRelationship.php;h=9b8e86d2d5f6d87764fad04034639e9ea0266746;hp=6145c9478ab3b08dbc0a5084c341e20cea0eaa47;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/modules/contrib/entityqueue/src/Plugin/views/relationship/EntityQueueRelationship.php b/web/modules/contrib/entityqueue/src/Plugin/views/relationship/EntityQueueRelationship.php index 6145c9478..9b8e86d2d 100644 --- a/web/modules/contrib/entityqueue/src/Plugin/views/relationship/EntityQueueRelationship.php +++ b/web/modules/contrib/entityqueue/src/Plugin/views/relationship/EntityQueueRelationship.php @@ -109,8 +109,6 @@ class EntityQueueRelationship extends EntityReverse implements CacheableDependen * {@inheritdoc} */ public function query() { - parent::query(); - // Add a 'where' condition if needed. if (!empty($this->definition['extra'])) { $bundles = []; @@ -121,12 +119,16 @@ class EntityQueueRelationship extends EntityReverse implements CacheableDependen $bundles[] = $extra['value']; } } - $this->definition['join_extra'][] = [ - 'field' => 'bundle', - 'operator' => 'IN', - 'value' => [$bundles], - ]; + if (count($bundles) > 0) { + $this->definition['join_extra'][] = [ + 'field' => 'bundle', + 'value' => $bundles, + ]; + } } + + // Now - let's build the query. + parent::query(); } }