aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index fa633031..1d0df889 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -86,7 +86,13 @@ class EntryController extends Controller
86 { 86 {
87 $entry = new Entry($this->getUser()); 87 $entry = new Entry($this->getUser());
88 $entry->setUrl($request->get('url')); 88 $entry->setUrl($request->get('url'));
89 $this->updateEntry($entry); 89
90 // check for existing entry, if it exists, redirect to it with a message
91 $existingEntry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
92
93 if (false === $existingEntry) {
94 $this->updateEntry($entry);
95 }
90 96
91 return $this->redirect($this->generateUrl('homepage')); 97 return $this->redirect($this->generateUrl('homepage'));
92 } 98 }