Skip to content

Commit

Permalink
Merge pull request #1619 from JTNMW/mods
Browse files Browse the repository at this point in the history
modification following #1541
  • Loading branch information
bobdenotter authored Jul 10, 2020
2 parents a574714 + 2e70749 commit 6b07c28
Showing 1 changed file with 5 additions and 7 deletions.
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

0 comments on commit 6b07c28

Please sign in to comment.