aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index a77489e2..bd87c6f4 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -31,10 +31,14 @@ class EntryController extends Controller
31 $form->handleRequest($request); 31 $form->handleRequest($request);
32 32
33 if ($form->isValid()) { 33 if ($form->isValid()) {
34 $content = Extractor::extract($entry->getUrl()); 34 $content = $this->get('wallabag_core.graby')->fetchContent($entry->getUrl());
35 35
36 $entry->setTitle($content->getTitle()); 36 $entry->setTitle($content['title']);
37 $entry->setContent($content->getBody()); 37 $entry->setContent($content['html']);
38 $entry->setMimetype($content['content_type']);
39 if (isset($content['open_graph']['og_image'])) {
40 $entry->setPreviewPicture($content['open_graph']['og_image']);
41 }
38 42
39 $em = $this->getDoctrine()->getManager(); 43 $em = $this->getDoctrine()->getManager();
40 $em->persist($entry); 44 $em->persist($entry);