diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-10 12:12:44 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-10 12:12:44 +0100 |
commit | d4c029f46ee3a3ea9715c388f6f9c9a1e65edf50 (patch) | |
tree | 5364a6811f73ba7cf4e14af2cee5f1ff20f7087c /src/Wallabag/CoreBundle/Controller | |
parent | c5e8ba25bb0d6d59b3275480f406b5ce3fa83b75 (diff) | |
download | wallabag-d4c029f46ee3a3ea9715c388f6f9c9a1e65edf50.tar.gz wallabag-d4c029f46ee3a3ea9715c388f6f9c9a1e65edf50.tar.zst wallabag-d4c029f46ee3a3ea9715c388f6f9c9a1e65edf50.zip |
review from @j0k3r
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 3 |
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; | |||
8 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | 8 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
9 | use Wallabag\CoreBundle\Entity\Entry; | 9 | use Wallabag\CoreBundle\Entity\Entry; |
10 | use Wallabag\CoreBundle\Entity\Tags; | 10 | use Wallabag\CoreBundle\Entity\Tags; |
11 | use Wallabag\CoreBundle\Entity\User; | ||
12 | use Wallabag\CoreBundle\Service\Extractor; | 11 | use Wallabag\CoreBundle\Service\Extractor; |
13 | 12 | ||
14 | class WallabagRestController extends Controller | 13 | class 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()); |