aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-10 12:12:44 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-10 12:12:44 +0100
commitd4c029f46ee3a3ea9715c388f6f9c9a1e65edf50 (patch)
tree5364a6811f73ba7cf4e14af2cee5f1ff20f7087c /src/Wallabag/CoreBundle/Controller/WallabagRestController.php
parentc5e8ba25bb0d6d59b3275480f406b5ce3fa83b75 (diff)
downloadwallabag-d4c029f46ee3a3ea9715c388f6f9c9a1e65edf50.tar.gz
wallabag-d4c029f46ee3a3ea9715c388f6f9c9a1e65edf50.tar.zst
wallabag-d4c029f46ee3a3ea9715c388f6f9c9a1e65edf50.zip
review from @j0k3r
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/WallabagRestController.php')
-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());