Change the way to check for an existing entry

The repository method return the entry found or false if nothing exists.
This commit is contained in:
Jeremy Benoist
2015-12-24 15:19:50 +01:00
parent 27a8708b67
commit 5a4bbcc9a7
4 changed files with 20 additions and 12 deletions

View File

@ -117,9 +117,9 @@ class PocketImport implements ImportInterface
$existingEntry = $this->em
->getRepository('WallabagCoreBundle:Entry')
->findOneByUrlAndUserId($url, $this->user->getId());
->existByUrlAndUserId($url, $this->user->getId());
if (count($existingEntry) > 0) {
if (false !== $existingEntry) {
++$this->skippedEntries;
continue;
}