1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00

Added test for deduplication

This commit is contained in:
Nicolas Lœuillet 2017-05-05 14:33:36 +02:00
parent c613df0e25
commit d09fe4d233
No known key found for this signature in database
GPG key ID: BDC1EFB5CA0145F2
4 changed files with 67 additions and 3 deletions

View file

@ -392,4 +392,23 @@ class EntryRepository extends EntityRepository
return $qb->getQuery()->getArrayResult();
}
/**
* Find all entries by url and owner.
*
* @param $url
* @param $userId
*
* @return array
*/
public function findAllByUrlAndUserId($url, $userId)
{
$res = $this->createQueryBuilder('e')
->where('e.url = :url')->setParameter('url', urldecode($url))
->andWhere('e.user = :user_id')->setParameter('user_id', $userId)
->getQuery()
->getResult();
return $res;
}
}