aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/WallabagRestController.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
index 96d2529a..ddb1f8a5 100644
--- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
@@ -8,7 +8,6 @@ use Symfony\Component\HttpFoundation\Request;
8use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; 8use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
9use Wallabag\CoreBundle\Entity\Entry; 9use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\CoreBundle\Entity\Tags; 10use Wallabag\CoreBundle\Entity\Tags;
11use Wallabag\CoreBundle\Entity\User;
12use Wallabag\CoreBundle\Service\Extractor; 11use Wallabag\CoreBundle\Service\Extractor;
13 12
14class WallabagRestController extends Controller 13class WallabagRestController extends Controller
@@ -109,7 +108,7 @@ class WallabagRestController extends Controller
109 $url = $request->request->get('url'); 108 $url = $request->request->get('url');
110 109
111 $content = Extractor::extract($url); 110 $content = Extractor::extract($url);
112 $entry = new Entry($this->getUser()->getId()); 111 $entry = new Entry($this->getUser());
113 $entry->setUrl($url); 112 $entry->setUrl($url);
114 $entry->setTitle($request->request->get('title') ?: $content->getTitle()); 113 $entry->setTitle($request->request->get('title') ?: $content->getTitle());
115 $entry->setContent($content->getBody()); 114 $entry->setContent($content->getBody());