mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
really do not show thirdparty which are not active
This commit is contained in:
@@ -34,6 +34,12 @@ final class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareRepository
|
|||||||
{
|
{
|
||||||
$qb = $this->thirdPartyRepository->createQueryBuilder('tp');
|
$qb = $this->thirdPartyRepository->createQueryBuilder('tp');
|
||||||
|
|
||||||
|
$qb->leftJoin('tp.parent', 'parent')
|
||||||
|
->andWhere($qb->expr()->andX(
|
||||||
|
'tp.active = \'TRUE\'',
|
||||||
|
$qb->expr()->orX($qb->expr()->isNull('parent'), 'parent.active = \'TRUE\'')
|
||||||
|
));
|
||||||
|
|
||||||
if (null !== $filterString) {
|
if (null !== $filterString) {
|
||||||
$qb->andWhere($qb->expr()->like('tp.canonicalized', 'LOWER(UNACCENT(:filterString))'))
|
$qb->andWhere($qb->expr()->like('tp.canonicalized', 'LOWER(UNACCENT(:filterString))'))
|
||||||
->setParameter('filterString', '%' . $filterString . '%');
|
->setParameter('filterString', '%' . $filterString . '%');
|
||||||
|
@@ -113,7 +113,8 @@ class ThirdPartyApiSearch implements SearchApiInterface
|
|||||||
[],
|
[],
|
||||||
...$pertinenceArgs
|
...$pertinenceArgs
|
||||||
))
|
))
|
||||||
->andWhereClause(implode(' AND ', $wheres), array_merge(
|
->andWhereClause(implode(' AND ', $wheres)
|
||||||
|
.' AND tparty.active IS TRUE and (parent.active IS TRUE OR parent IS NULL)', array_merge(
|
||||||
[],
|
[],
|
||||||
...$whereArgs
|
...$whereArgs
|
||||||
));
|
));
|
||||||
|
Reference in New Issue
Block a user