diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index ae9a93aa3..afd708e6a 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 07d41ed8f..a0503c391 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 e9e75efa3..e9e79c670 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"