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

index 26cbac9b069a33d11dc3f5ba5847e0978cccd744..3800bca6cb4e852c9a76e88cad7bfdbc5bb87108 100644 (file)
@@ -1271,6 +1271,7 @@ 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,10 +1282,10 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
             $conditions[] = $e;
         }
 
-        if(!$conditions){
-            return;
+        if (!$conditions) {
+            $conditions = ['custom,custom'];
         }
-        $this->config->hasContentLock = true;
+
         $page = max(1, $page);
         if (!isset($this->content_lock[$page])) {
             $this->content_lock[$page] = ['page' => $page, 'unlocked' => 0, 'conditions' => []];