diff options
Diffstat (limited to 'src/Wallabag')
-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()); |