mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-30 22:16:14 +00:00
really do not show thirdparty which are not active
This commit is contained in:
parent
9812710cd0
commit
dae9d48574
@ -34,6 +34,12 @@ final class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareRepository
|
||||
{
|
||||
$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) {
|
||||
$qb->andWhere($qb->expr()->like('tp.canonicalized', 'LOWER(UNACCENT(:filterString))'))
|
||||
->setParameter('filterString', '%' . $filterString . '%');
|
||||
|
@ -113,7 +113,8 @@ class ThirdPartyApiSearch implements SearchApiInterface
|
||||
[],
|
||||
...$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
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user