]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7786 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Oct 2025 16:58:17 +0000 (18:58 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Oct 2025 16:58:17 +0000 (18:58 +0200)
app/Fluidbook/Compiler/Compiler.php
app/Http/Controllers/Admin/Operations/FluidbookPublication/PreviewOperation.php

index b58c917456c1fff92a849c35555bcd4a9c6075b3..e24f145296b0045c9ef1caa00896592f4b7585de 100644 (file)
@@ -269,6 +269,9 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
     protected $_links;
     protected $_rulers;
 
+    protected $scormVariant = false;
+    protected $disableLoadBalancer = false;
+
     protected $_docDimensions = [];
 
     public $_signature;
@@ -326,7 +329,8 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
         $this->multiApp = $this->home = $home;
         $this->devversion = /*$this->getFluidbook()->version < 3 ? "dev" : */
             $this->getFluidbook()->mobileLVersion;
-        $this->scormVariant = $variant==='scorm';
+        $this->scormVariant = $variant === 'scorm';
+        $this->disableLoadBalancer = $variant === 'nolb';
 
         $this->hybrid = $hybrid;
 
@@ -534,6 +538,10 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
         if (!$this->scormVariant) {
             $this->fluidbookSettings->scorm_enable = false;
         }
+        if ($this->disableLoadBalancer) {
+            $this->fluidbookSettings->hosting_loadbalancer = false;
+        }
+
 
         $this->config = new Data(array_merge($this->fluidbookSettings->getRawData()['settings'], $this->themeSettings->getRawData()));
 
index 7b023274239fd4ec60dc4b7599ea43b62f731bff..ee2b51745ae21921fa12b6cd04af555d2739051a 100644 (file)
@@ -134,11 +134,12 @@ trait PreviewOperation
             $skipCompile = false;
         }
 
-        $dest = $fluidbook->getFinalPath($theme, $version?:'online');
+        $dest = $fluidbook->getFinalPath($theme, $version ?: 'online');
+
         if ($path === 'index.html') {
             $fluidbook->incrementPreviewVisit();
             if (!$skipCompile) {
-                $compiler = new Compiler($fluidbook, $isScorm, theme: $theme);
+                $compiler = new Compiler($fluidbook, $version, theme: $theme);
                 $compiler->handle();
             }
         }