]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controller/admin/ShaarePublishController.php
Bulk creation: fix private status based on the first form
[github/shaarli/Shaarli.git] / application / front / controller / admin / ShaarePublishController.php
index 608f79cfe1e7a29fe1e9b8861a7dde0204c951ce..fd680ea0090ca1e72d3d3c5d3b1ff3add7c66317 100644 (file)
@@ -169,7 +169,11 @@ class ShaarePublishController extends ShaarliAdminController
             $title = $request->getParam('title');
             $description = $request->getParam('description');
             $tags = $request->getParam('tags');
-            $private = filter_var($request->getParam('private'), FILTER_VALIDATE_BOOLEAN);
+            if ($request->getParam('private') !== null) {
+                $private = filter_var($request->getParam('private'), FILTER_VALIDATE_BOOLEAN);
+            } else {
+                $private = $this->container->conf->get('privacy.default_private_links', false);
+            }
 
             // If this is an HTTP(S) link, we try go get the page to extract
             // the title (otherwise we will to straight to the edit form.)