From: Vincent Vanwaelscappel Date: Tue, 13 Jan 2026 15:55:44 +0000 (+0100) Subject: wait #7939 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9d6a124f3169d3f46e1501e44eac6e6da696b2ca;p=fluidbook-toolbox.git wait #7939 --- diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index 26cbac9b0..3800bca6c 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -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' => []];