diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-05 18:19:34 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-05 18:19:34 +0100 |
commit | 9e0fff7cb09879d7545db5d4a15da86426b8a19a (patch) | |
tree | 99dd181f45f3a3f8f51e7d8bc61e409881ff0ca5 | |
parent | 77bb7b92a2ea71178edb03c482db33ddf179857d (diff) | |
download | wallabag-9e0fff7cb09879d7545db5d4a15da86426b8a19a.tar.gz wallabag-9e0fff7cb09879d7545db5d4a15da86426b8a19a.tar.zst wallabag-9e0fff7cb09879d7545db5d4a15da86426b8a19a.zip |
simplify code
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index eb19f0f5..abbf5437 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php | |||
@@ -87,7 +87,7 @@ class WallabagRestController extends Controller | |||
87 | $entry = new Entries(); | 87 | $entry = new Entries(); |
88 | $entry->setUserId(1); | 88 | $entry->setUserId(1); |
89 | $entry->setUrl($url); | 89 | $entry->setUrl($url); |
90 | $entry->setTitle(!is_null($request->request->get('title')) ? $request->request->get('title') : $content->getTitle()); | 90 | $entry->setTitle($request->request->get('title') ?: $content->getTitle()); |
91 | $entry->setContent($content->getBody()); | 91 | $entry->setContent($content->getBody()); |
92 | $em = $this->getDoctrine()->getManager(); | 92 | $em = $this->getDoctrine()->getManager(); |
93 | $em->persist($entry); | 93 | $em->persist($entry); |