]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7939 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jan 2026 15:20:40 +0000 (16:20 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jan 2026 15:20:40 +0000 (16:20 +0100)
app/Fluidbook/Compiler/Compiler.php

index 9a979fd66ddb9fb1fd87d4aee55a5434d5f160ec..26cbac9b069a33d11dc3f5ba5847e0978cccd744 100644 (file)
@@ -1271,7 +1271,6 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
 
     public function addContentLock($page, $unlockConditions = '')
     {
-        $this->config->hasContentLock = true;
         $unlockConditions = Text::explodeNewLines($unlockConditions);
         $conditions = [];
         foreach ($unlockConditions as $unlockCondition) {
@@ -1281,6 +1280,11 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
             }
             $conditions[] = $e;
         }
+
+        if(!$conditions){
+            return;
+        }
+        $this->config->hasContentLock = true;
         $page = max(1, $page);
         if (!isset($this->content_lock[$page])) {
             $this->content_lock[$page] = ['page' => $page, 'unlocked' => 0, 'conditions' => []];