aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/EntryController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-10-26 15:49:44 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-02 23:27:41 +0100
commit303768dfe9b85f87d043eb225c5c8c3a88d8c051 (patch)
tree8e29ed85236f012ac4a18b01e271a97800d98fa7 /src/Wallabag/CoreBundle/Controller/EntryController.php
parentdda57bb9443817e3a080d5d25343f5a7e15dd14f (diff)
downloadwallabag-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/Controller/EntryController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index de2eedcb..9097810c 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -51,15 +51,15 @@ class EntryController extends Controller
51 if ($form->isValid()) { 51 if ($form->isValid()) {
52 $existingEntry = $em 52 $existingEntry = $em
53 ->getRepository('WallabagCoreBundle:Entry') 53 ->getRepository('WallabagCoreBundle:Entry')
54 ->findOneByUrl($entry->getUrl()); 54 ->findOneByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
55 55
56 if (!is_null($existingEntry)) { 56 if (count($existingEntry) > 0) {
57 $this->get('session')->getFlashBag()->add( 57 $this->get('session')->getFlashBag()->add(
58 'notice', 58 'notice',
59 'Entry already saved on '.$existingEntry->getCreatedAt()->format('d-m-Y') 59 'Entry already saved on '.$existingEntry[0]->getCreatedAt()->format('d-m-Y')
60 ); 60 );
61 61
62 return $this->redirect($this->generateUrl('view', array('id' => $existingEntry->getId()))); 62 return $this->redirect($this->generateUrl('view', array('id' => $existingEntry[0]->getId())));
63 } 63 }
64 64
65 $this->updateEntry($entry); 65 $this->updateEntry($entry);