diff --git a/src/Repository/TorrentRepository.php b/src/Repository/TorrentRepository.php index 67dd457..035dc3d 100644 --- a/src/Repository/TorrentRepository.php +++ b/src/Repository/TorrentRepository.php @@ -72,21 +72,22 @@ class TorrentRepository extends ServiceEntityRepository if ($keywords) // @TODO ANY or DTS { - $orX = $query->expr()->orX(); + $andX = $query->expr()->andX(); foreach ($keywords as $i => $keyword) { $keyword = mb_strtolower($keyword); // all keywords stored in lowercase - $orX->add("t.keywords LIKE :keyword{$i}"); + $andX->add("t.keywords LIKE :keyword{$i}"); $query->setParameter(":keyword{$i}", "%{$keyword}%"); } - $query->andWhere($orX); + $query->andWhere($andX); } if ($locales) // @TODO ANY or DTS { + //$orX = $query->expr()->orX(); $orX = $query->expr()->orX(); foreach ($locales as $i => $locale)