]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/EntryRestController.php
CS
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / EntryRestController.php
index ae9a93aa3cbea81a4d1a1dbf6b16de7ea8f859b6..768c4fdc3423c7db828a9bca9d854bc2f884e69a 100644 (file)
@@ -680,10 +680,10 @@ class EntryRestController extends WallabagRestController
         }
 
         if (!is_null($isPublic)) {
-            $entry->cleanUid();
-
             if (true === (bool) $isPublic && null === $entry->getUid()) {
                 $entry->generateUid();
+            } elseif (false === (bool) $isPublic) {
+                $entry->cleanUid();
             }
         }