mirror of
https://github.com/wallabag/wallabag.git
synced 2024-10-31 22:28:54 +00:00
Fix duplicate article when added via the bookmarklet
This commit is contained in:
parent
e969c2a7ef
commit
f652f41dab
1 changed files with 7 additions and 1 deletions
|
@ -86,7 +86,13 @@ class EntryController extends Controller
|
|||
{
|
||||
$entry = new Entry($this->getUser());
|
||||
$entry->setUrl($request->get('url'));
|
||||
$this->updateEntry($entry);
|
||||
|
||||
// check for existing entry, if it exists, redirect to it with a message
|
||||
$existingEntry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
|
||||
|
||||
if (false === $existingEntry) {
|
||||
$this->updateEntry($entry);
|
||||
}
|
||||
|
||||
return $this->redirect($this->generateUrl('homepage'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue