From d0096cbfe2f51d9406ab9738590f72a569729e33 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 15 Oct 2023 03:28:56 +0300 Subject: [PATCH] make search keywords case insensitive --- src/Repository/TorrentRepository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Repository/TorrentRepository.php b/src/Repository/TorrentRepository.php index a8f12f6..67dd457 100644 --- a/src/Repository/TorrentRepository.php +++ b/src/Repository/TorrentRepository.php @@ -76,6 +76,8 @@ class TorrentRepository extends ServiceEntityRepository foreach ($keywords as $i => $keyword) { + $keyword = mb_strtolower($keyword); // all keywords stored in lowercase + $orX->add("t.keywords LIKE :keyword{$i}"); $query->setParameter(":keyword{$i}", "%{$keyword}%"); }