Merge pull request #2328 from wallabag/avoid-duplicate-url

Avoid duplicate url with accents
This commit is contained in:
Nicolas Lœuillet
2016-10-02 13:14:16 +02:00
committed by GitHub
2 changed files with 45 additions and 1 deletions

View File

@ -281,7 +281,7 @@ class EntryRepository extends EntityRepository
public function findByUrlAndUserId($url, $userId)
{
$res = $this->createQueryBuilder('e')
->where('e.url = :url')->setParameter('url', $url)
->where('e.url = :url')->setParameter('url', urldecode($url))
->andWhere('e.user = :user_id')->setParameter('user_id', $userId)
->getQuery()
->getResult();