X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FEntryRestController.php;h=acca219fec733aabaf809d346dcfbb102c64891a;hb=af29e1bf07aabaa6a4e4653c1a3b5c10ce831bb6;hp=7d820c7e606195e15697cd652442308e56643e8d;hpb=70265817aee257e7e635eda79ce3e037e3b4a242;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 7d820c7e..acca219f 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -381,6 +381,14 @@ class EntryRestController extends WallabagRestController } } + if (empty($entry->getDomainName())) { + $this->get('wallabag_core.content_proxy')->setEntryDomainName($entry); + } + + if (empty($entry->getTitle())) { + $this->get('wallabag_core.content_proxy')->setDefaultEntryTitle($entry); + } + $em = $this->getDoctrine()->getManager(); $em->persist($entry); $em->flush(); @@ -490,6 +498,14 @@ class EntryRestController extends WallabagRestController $entry->setOriginUrl($data['origin_url']); } + if (empty($entry->getDomainName())) { + $this->get('wallabag_core.content_proxy')->setEntryDomainName($entry); + } + + if (empty($entry->getTitle())) { + $this->get('wallabag_core.content_proxy')->setDefaultEntryTitle($entry); + } + $em = $this->getDoctrine()->getManager(); $em->persist($entry); $em->flush();