]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6639 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Jan 2024 15:48:18 +0000 (16:48 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Jan 2024 15:48:18 +0000 (16:48 +0100)
app/Fluidbook/Compiler/Compiler.php
app/Fluidbook/Farm.php
app/Models/FluidbookPublication.php
scripts/fixrights.sh

index a2361ed3b4bb24a1c8a615b7774b324112e07679..e74533751d6b6062fdda80352c2a2264e02a0cf4 100644 (file)
@@ -769,6 +769,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
         $this->writeJs();
         $this->log('Js written');
         $this->vdir->sync(true, $this);
+        `chmod -R 775 $this->dir`;
         $this->log('Files Synced');
 //        $f=rtrim(str_replace('/html5/', '/compiletime/', $this->dir));
 //        touch($f);
index 3545088446a8c20ee1d7cc1ec4e3c943d9c35788..6b69c0db5e23d5aaf30d28b4c7a04463cfd2c38f 100644 (file)
@@ -14,8 +14,8 @@ use Mockery\Exception;
 class Farm
 {
     protected static $_outPDF = [];
-    protected static $_forceServer = false;
-    //protected static $_forceServer = 'alphaville';
+    //protected static $_forceServer = false;
+    protected static $_forceServer = 'alphaville';
 
     protected static $_region = Region::EUROPE;
 
index eaebdbfbb8d6d520cc1b9c96e27d475136721fa9..2d82741f73908de37ace1659386558c7e48db5bf 100644 (file)
@@ -448,11 +448,13 @@ class FluidbookPublication extends ToolboxStatusModel
             if (file_exists($thumbpdf)) {
                 try {
                     Farm::setRegion($this->region);
-                    return Farm::getFileFromPDF($thumbpdf, $page, $format, $resolution, $this->JPEGQuality, $withText, $withGraphics, $version, null, $force, 1);
+                    $res = Farm::getFileFromPDF($thumbpdf, $page, $format, $resolution, $this->JPEGQuality, $withText, $withGraphics, $version, null, $force, 1);
+                    return $res;
                 } catch (\Exception $e) {
                     throw new \Exception('Unable to generate thumbnails file from custom PDF "' . $this->pdfThumbnails . '" (original message : ' . $e->getMessage() . ')');
                 }
             } else {
+                Log::warning('Thumbnails file ' . $thumbpdf . ' not found. Generating file from standard PDF');
             }
         }
         return $this->getFile($page, $format, $resolution, $withText, $withGraphics, $version, $force);
index 6fe1cfc59981b3d45e9a50cc55df31828e0d3b39..1d228909b45e2fd1c847265d7cbbda492cd34e92 100644 (file)
@@ -26,3 +26,5 @@ chmod -R 775 /data/toolbox/alpha/scripts
 chmod -R 775 /data/toolbox/alpha/protected
 chmod -R 775 /data/toolbox/alpha/public
 chmod -R 775 /data/toolbox/alpha/bin
+
+find /data/extranet/www/fluidbook/ -type d -prune -o -exec chown -R toolbox:www-data {} \;