Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/Storage/SelectQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,12 @@ public function doFieldJoins(): void
$innerQuery->andWhere($fieldsAlias . '.name = :' . $keyParam);
$this->qb->setParameter($keyParam, $key);
} else {
//added to include taxonomies to be searched as part of contenttype filter at the backend if anyField param is set.
//added to include taxonomies to be searched as part of contenttype filter at the backend and frontend if anyField param is set.
foreach ($filter->getParameters() as $value) {
foreach ($this->getTaxonomyFields() as $key) {
$innerQuery->innerJoin($contentAlias . '.taxonomies', 'taxonomies_' . $key);
$this->qb->setParameter($key . '_1', $value);
$filterExpression = sprintf('LOWER(taxonomies_%s.slug) LIKE :%s', $key, $key . '_1');
$innerQuery->orWhere($filterExpression);
}
$innerQuery->innerJoin($contentAlias . '.taxonomies', 'taxonomies_' . $index);
$this->qb->setParameter($key . '_1', $value);
$filterExpression = sprintf('LOWER(taxonomies_%s.slug) LIKE :%s', $index, $key . '_1');
$innerQuery->orWhere($filterExpression);
}
}

Expand Down