forked from wallabag/wallabag
Use hash given url to avoid duplicate
Using hashed url we can ensure an index on them to ensure it's fast.
This commit is contained in:
@ -368,7 +368,7 @@ class EntryRepository extends EntityRepository
|
||||
{
|
||||
$res = $this->createQueryBuilder('e')
|
||||
->where('e.hashedUrl = :hashed_url')->setParameter('hashed_url', $hashedUrl)
|
||||
// ->orWhere('e.givenUrl = :url')->setParameter('url', $url)
|
||||
->orWhere('e.hashedGivenUrl = :hashed_given_url')->setParameter('hashed_given_url', $hashedUrl)
|
||||
->andWhere('e.user = :user_id')->setParameter('user_id', $userId)
|
||||
->getQuery()
|
||||
->getResult();
|
||||
|
||||
Reference in New Issue
Block a user