diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@smile.fr> | 2015-10-26 15:49:44 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-02 23:27:41 +0100 |
commit | 303768dfe9b85f87d043eb225c5c8c3a88d8c051 (patch) | |
tree | 8e29ed85236f012ac4a18b01e271a97800d98fa7 /src/Wallabag/CoreBundle/Repository/EntryRepository.php | |
parent | dda57bb9443817e3a080d5d25343f5a7e15dd14f (diff) | |
download | wallabag-303768dfe9b85f87d043eb225c5c8c3a88d8c051.tar.gz wallabag-303768dfe9b85f87d043eb225c5c8c3a88d8c051.tar.zst wallabag-303768dfe9b85f87d043eb225c5c8c3a88d8c051.zip |
- remove importers configuration
- add check on userId for findOneByURL for entries
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index ca71970b..502e9da0 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -223,4 +223,21 @@ class EntryRepository extends EntityRepository | |||
223 | ->getQuery() | 223 | ->getQuery() |
224 | ->getResult(); | 224 | ->getResult(); |
225 | } | 225 | } |
226 | |||
227 | /** | ||
228 | * Find an entry by its url and its owner. | ||
229 | * | ||
230 | * @param $url | ||
231 | * @param $userId | ||
232 | * | ||
233 | * @return array | ||
234 | */ | ||
235 | public function findOneByUrlAndUserId($url, $userId) | ||
236 | { | ||
237 | return $this->createQueryBuilder('e') | ||
238 | ->where('e.url = :url')->setParameter('url', $url) | ||
239 | ->andWhere('e.user = :user_id')->setParameter('user_id', $userId) | ||
240 | ->getQuery() | ||
241 | ->getResult(); | ||
242 | } | ||
226 | } | 243 | } |