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:
parent
c613df0e25
commit
d09fe4d233
4 changed files with 67 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue