]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/EntryRestController.php
Better rendering for all core commands
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / EntryRestController.php
index a2e913afebafa6b0f038d3c360a9bff68462ce43..9277e1a19f093837efbb34540bc0996b02d32bc0 100644 (file)
@@ -180,6 +180,7 @@ class EntryRestController extends WallabagRestController
         return $this->get('wallabag_core.helper.entries_export')
             ->setEntries($entry)
             ->updateTitle('entry')
+            ->updateAuthor('entry')
             ->exportAs($request->attributes->get('_format'));
     }
 
@@ -354,11 +355,11 @@ class EntryRestController extends WallabagRestController
             ]);
         }
 
-        if (!is_null($data['isArchived'])) {
+        if (null !== $data['isArchived']) {
             $entry->setArchived((bool) $data['isArchived']);
         }
 
-        if (!is_null($data['isStarred'])) {
+        if (null !== $data['isStarred']) {
             $entry->setStarred((bool) $data['isStarred']);
         }
 
@@ -366,7 +367,7 @@ class EntryRestController extends WallabagRestController
             $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']);
         }
 
-        if (!is_null($data['isPublic'])) {
+        if (null !== $data['isPublic']) {
             if (true === (bool) $data['isPublic'] && null === $entry->getUid()) {
                 $entry->generateUid();
             } elseif (false === (bool) $data['isPublic']) {
@@ -457,11 +458,11 @@ class EntryRestController extends WallabagRestController
             $contentProxy->updatePublishedAt($entry, $data['publishedAt']);
         }
 
-        if (!is_null($data['isArchived'])) {
+        if (null !== $data['isArchived']) {
             $entry->setArchived((bool) $data['isArchived']);
         }
 
-        if (!is_null($data['isStarred'])) {
+        if (null !== $data['isStarred']) {
             $entry->setStarred((bool) $data['isStarred']);
         }
 
@@ -470,7 +471,7 @@ class EntryRestController extends WallabagRestController
             $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']);
         }
 
-        if (!is_null($data['isPublic'])) {
+        if (null !== $data['isPublic']) {
             if (true === (bool) $data['isPublic'] && null === $entry->getUid()) {
                 $entry->generateUid();
             } elseif (false === (bool) $data['isPublic']) {