diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-07-03 13:56:39 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-07-03 13:56:39 +0200 |
commit | c18a2476b601bc6b9893462d9be680c2e13c89e8 (patch) | |
tree | e1e2d162251b7069236ce66bc57694695d5571bb /src/Wallabag/ApiBundle/Controller | |
parent | d0ec2ddd2354e39badd947c2214f47193784b1c7 (diff) | |
download | wallabag-c18a2476b601bc6b9893462d9be680c2e13c89e8.tar.gz wallabag-c18a2476b601bc6b9893462d9be680c2e13c89e8.tar.zst wallabag-c18a2476b601bc6b9893462d9be680c2e13c89e8.zip |
CS
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/EntryRestController.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index a2e913af..8a206124 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -354,11 +354,11 @@ class EntryRestController extends WallabagRestController | |||
354 | ]); | 354 | ]); |
355 | } | 355 | } |
356 | 356 | ||
357 | if (!is_null($data['isArchived'])) { | 357 | if (null !== $data['isArchived']) { |
358 | $entry->setArchived((bool) $data['isArchived']); | 358 | $entry->setArchived((bool) $data['isArchived']); |
359 | } | 359 | } |
360 | 360 | ||
361 | if (!is_null($data['isStarred'])) { | 361 | if (null !== $data['isStarred']) { |
362 | $entry->setStarred((bool) $data['isStarred']); | 362 | $entry->setStarred((bool) $data['isStarred']); |
363 | } | 363 | } |
364 | 364 | ||
@@ -366,7 +366,7 @@ class EntryRestController extends WallabagRestController | |||
366 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']); | 366 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']); |
367 | } | 367 | } |
368 | 368 | ||
369 | if (!is_null($data['isPublic'])) { | 369 | if (null !== $data['isPublic']) { |
370 | if (true === (bool) $data['isPublic'] && null === $entry->getUid()) { | 370 | if (true === (bool) $data['isPublic'] && null === $entry->getUid()) { |
371 | $entry->generateUid(); | 371 | $entry->generateUid(); |
372 | } elseif (false === (bool) $data['isPublic']) { | 372 | } elseif (false === (bool) $data['isPublic']) { |
@@ -457,11 +457,11 @@ class EntryRestController extends WallabagRestController | |||
457 | $contentProxy->updatePublishedAt($entry, $data['publishedAt']); | 457 | $contentProxy->updatePublishedAt($entry, $data['publishedAt']); |
458 | } | 458 | } |
459 | 459 | ||
460 | if (!is_null($data['isArchived'])) { | 460 | if (null !== $data['isArchived']) { |
461 | $entry->setArchived((bool) $data['isArchived']); | 461 | $entry->setArchived((bool) $data['isArchived']); |
462 | } | 462 | } |
463 | 463 | ||
464 | if (!is_null($data['isStarred'])) { | 464 | if (null !== $data['isStarred']) { |
465 | $entry->setStarred((bool) $data['isStarred']); | 465 | $entry->setStarred((bool) $data['isStarred']); |
466 | } | 466 | } |
467 | 467 | ||
@@ -470,7 +470,7 @@ class EntryRestController extends WallabagRestController | |||
470 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']); | 470 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']); |
471 | } | 471 | } |
472 | 472 | ||
473 | if (!is_null($data['isPublic'])) { | 473 | if (null !== $data['isPublic']) { |
474 | if (true === (bool) $data['isPublic'] && null === $entry->getUid()) { | 474 | if (true === (bool) $data['isPublic'] && null === $entry->getUid()) { |
475 | $entry->generateUid(); | 475 | $entry->generateUid(); |
476 | } elseif (false === (bool) $data['isPublic']) { | 476 | } elseif (false === (bool) $data['isPublic']) { |