aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2017-02-02 21:39:28 +0100
committerKevin Decherf <kevin@kdecherf.com>2017-02-16 21:47:52 +0100
commiteac09b48b08f5cbc0d219da000026c38a265583a (patch)
tree64096c61cc5b501a94f9b124f7a0fd6ce7dfa003 /src/Wallabag/CoreBundle/Repository/EntryRepository.php
parent8a098044bfbe00fa2bd08b01a6d19871b03f28b7 (diff)
downloadwallabag-eac09b48b08f5cbc0d219da000026c38a265583a.tar.gz
wallabag-eac09b48b08f5cbc0d219da000026c38a265583a.tar.zst
wallabag-eac09b48b08f5cbc0d219da000026c38a265583a.zip
Search by term: extend to entries url
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index b9532fa2..4071301d 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -106,8 +106,9 @@ class EntryRepository extends EntityRepository
106 $qb->andWhere('e.isArchived = true'); 106 $qb->andWhere('e.isArchived = true');
107 } 107 }
108 108
109 // We lower() all parts here because PostgreSQL 'LIKE' verb is case-sensitive
109 $qb 110 $qb
110 ->andWhere('e.content LIKE :term OR e.title LIKE :term')->setParameter('term', '%'.$term.'%') 111 ->andWhere('lower(e.content) LIKE lower(:term) OR lower(e.title) LIKE lower(:term) OR lower(e.url) LIKE lower(:term)')->setParameter('term', '%'.$term.'%')
111 ->leftJoin('e.tags', 't') 112 ->leftJoin('e.tags', 't')
112 ->groupBy('e.id'); 113 ->groupBy('e.id');
113 114