From a9c6577f0c51dd4282e022fa4b41cbb7b0e201b3 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 10 Jun 2017 15:37:25 +0200 Subject: [PATCH] Few fixes --- src/Wallabag/ApiBundle/Controller/EntryRestController.php | 4 ++-- src/Wallabag/CoreBundle/Entity/Entry.php | 1 + .../CoreBundle/Resources/translations/messages.fr.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index ae9a93aa..afd708e6 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -680,10 +680,10 @@ class EntryRestController extends WallabagRestController } if (!is_null($isPublic)) { - $entry->cleanUid(); - if (true === (bool) $isPublic && null === $entry->getUid()) { $entry->generateUid(); + } else if (false === (bool) $isPublic) { + $entry->cleanUid(); } } diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 07d41ed8..a0503c39 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -686,6 +686,7 @@ class Entry /** * Used in the entries filter so it's more explicit for the end user than the uid. + * Also used in the API. * * @VirtualProperty * @SerializedName("is_public") diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index e9e75efa..e9e79c67 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -187,7 +187,7 @@ entry: unread_label: "Non lus" preview_picture_label: "A une photo" preview_picture_help: "Photo" - is_public_label: 'A une lien public' + is_public_label: 'A un lien public' is_public_help: 'Lien public' language_label: "Langue" http_status_label: "Statut HTTP" -- 2.41.0